[GRASS-dev] Python grass script error

Margherita Di Leo diregola at gmail.com
Fri Jun 30 03:10:07 PDT 2017


Maris, thank you for checking this!! Was my mistake, I hadn't noticed that
I had a duplication of import grass.script as grass, the one throwing the
error was at the top of the script before declaring GISBASE..... need
holidays I guess.. sorry for the noise.

On Fri, Jun 30, 2017 at 11:59 AM, Maris Nartiss <maris.gis at gmail.com> wrote:

> Works just fine here.
> What is the output of os.getenv("GISBASE")? Are you trying to run this
> code outside of GRASS GIS session (this could explain lack of GISBASE
> environmental setting)?
>
> Māris.
>
>
> 2017-06-29 18:00 GMT+03:00 Margherita Di Leo <diregola at gmail.com>:
> > Hi,
> >
> > I have GRASS 7.3.svn (r71212). In python , calling grass.script I get:
> >
> >>>> import grass.script as grass
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> >   File "/usr/local/grass-7.3.svn/etc/python/grass/script/__init__.py",
> line
> > 5, in <module>
> >     from .core   import *
> >   File "/usr/local/grass-7.3.svn/etc/python/grass/script/core.py", line
> 35,
> > in <module>
> >     gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"),
> > 'locale'))
> >   File "/usr/lib64/python2.7/posixpath.py", line 70, in join
> >     elif path == '' or path.endswith('/'):
> > AttributeError: 'NoneType' object has no attribute 'endswith'
> >
> > Anyone can reproduce this error?
> >
> > Thank you in advance
> >
> >
> > --
> > Margherita Di Leo
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-dev
>



-- 
Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20170630/d70da52b/attachment.html>


More information about the grass-dev mailing list