<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 11:48 AM, TongXiaoye <span dir="ltr"><<a href="mailto:tongcaptaintong@hotmail.com" target="_blank">tongcaptaintong@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Dear there,<div>I'm currently using  GRASS 7 python shell on Windows 7 processing thousands of raster images.</div><div>It's inconvenient to test the code either by copying the code line by line or by running it using 'Launch script' from GUI.</div><div><br></div><div>Following the code in this link <a href="http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Python:_GRASS_GIS_7_with_existing_location" style="font-size:12pt" target="_blank">http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Python:_GRASS_GIS_7_with_existing_location</a>, I want to work with GRASS under Python environment.</div><div><br></div><div>I reset three parts to my computer's setting:</div><div><i>grass7bin_win = r'C:/Program Files (x86)/GRASS GIS 7.0.0/grass70.bat'</i></div><div><div><i>location = "MODIS_GUIWAGOU"</i></div><div><i>mapset   = "GUIWAGOU"</i></div></div><div><br></div><div>But I got this error:</div><div><div>Traceback (most recent call last):</div><div>  File "F:\PYTHON\PYTHON_GRASS7.py", line 81, in <module></div><div>    for rast in grass.list_strings(type = 'rast'):</div><div>  File "C:\Program Files (x86)\GRASS GIS 7.0.0\etc\python\grass\script\core.py", line 1110, in list_strings</div><div>    mapset=mapset).splitlines():</div><div>  File "C:\Program Files (x86)\GRASS GIS 7.0.0\etc\python\grass\script\core.py", line 427, in read_command</div><div>    return handle_errors(returncode, stdout, args, kwargs)</div><div>  File "C:\Program Files (x86)\GRASS GIS 7.0.0\etc\python\grass\script\core.py", line 310, in handle_errors</div><div>    returncode=returncode)</div><div>CalledModuleError: Module run None ['g.list', '--q', '-m', 'type=rast'] ended with error</div><div>Process ended with non-zero return code -1073741511. See errors in the (error) output.</div></div></div></div></blockquote><div><br></div><div>It should be type='raster', not type='rast' when calling g.list or its interface list_strings</div><div><br></div><div>Cheers,</div><div><br></div><div>Anna</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"><div><br></div><div>Do you know what's wrong?</div><div>Thank you for your help in advance!</div><div><br></div><div>Best,</div><div>Xiaoye</div>                                       </div></div>
<br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br></div></div>