<div dir="ltr"><div class="gmail_extra">Hi again Alassane!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 7:41 PM, alassane toure <span dir="ltr"><<a href="mailto:atourej@gmail.com" target="_blank">atourej@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>alassane@alassane-MS-7593:~/Programs/grass/pythongrass$ /home/alassane/Programs/grass/pythongrass/grass_noloc.py<br>  File "/home/alassane/Programs/grass/pythongrass/grass_noloc.py", line 62<br>    else:<br>       ^<br>SyntaxError: invalid syntax<br><br></div>The program works when I comment the followings statements<br><div><br>#  define GRASS DATABASE<br>if sys.platform.startswith('win'):<br>    gisdb = os.path.join(os.getenv('APPDATA', 'grassdata')<br>else:</div></blockquote></div><br><br></div><div class="gmail_extra">From looking at the code, it seems that the closing parentheses is missing in the os.getenv() function call.<br><br>I'm not sure which code you are using and also where your data actually are. APPDATA is not common for grassdata directory but should work of course if it is what you want. Anyway, this is what the documentation [1] suggests:<br><br>gisdb = os.path.join(os.path.expanduser("~"), "grassdata")<br><br></div><div class="gmail_extra">(and usually modifying for MS Windows with `os.path.expanduser("~"), ,"Documents", "grassdata"`.<br><br></div><div class="gmail_extra">Hope this helps,<br></div><div class="gmail_extra">Vaclav<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">PS: Please note you have <a href="mailto:grass-dev-request@lists.osgeo.org">grass-dev-request@lists.osgeo.org</a> mailing list in your To field. I don't think you want that (I'm not sure what would be the reason). You can of course subscribe to <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a> if you want to discuss some development of GRASS GIS!<br></div><div class="gmail_extra"><br>[1] <a href="https://grass.osgeo.org/grass70/manuals/libpython/script.html#module-script.setup">https://grass.osgeo.org/grass70/manuals/libpython/script.html#module-script.setup</a><br><br></div><div class="gmail_extra"><br></div></div>