[GRASS-dev] Python grass script error

Maris Nartiss maris.gis at gmail.com
Fri Jun 30 02:59:32 PDT 2017


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


More information about the grass-dev mailing list