Hi,
On Thu, Jul 18, 2013 at 11:30 PM, Hamish <hamis...@yahoo.com> wrote: > Anna wrote: > > I get this error when launching d.rast3d from layer manager > > toolbar on Windows. > > I fixed it in r57218 [1] but it I was wondering if there is > > some better solution? > ... > > Traceback (most recent call last): > ... > > Unable to fetch interface description for command 'd.rast3d.py'. > ... > > [1] http://trac.osgeo.org/grass/changeset/57218 > ... > > os.chdir(...) > > > Hi, > > the "Unable to fetch interface description for command" error is typically > because the g.parser script-handling module can not find the script that > called it in the system $PATH. > > (error message happens in lib/python/script/task.py) > > The os.chdir() solution may work on Windows since "." is usually in %PATH% > there, but on Unix "." is typically not in your path. > > I think it's better remove the os.chdir()s and replace them by adding > $GISBASE/etc/gui/scripts/ to the PATH when the wxGUI first starts up. > > Going into the grass7 wxGUI's Python shell tab, and import os, > os.getenv('PATH') shows the last entry as etc/gui/scripts/ already. > (tested on linux) :-/ so that might not be it. > the command is launched with python executable: .../python.exe d.rast3d.py so it seems that it expects the full path to the script and therefore chdir before it made it work. $GISBASE/etc/gui/scripts/ is already on the PATH. > > On linux the script is installed as "d.rast3d" without the .py, I guess > it keeps the .py extension on Windows? perhaps check how the script is > called: is e.g. 'd.rast3d.py' requested but 'd.rast3d' found? > there should be d.rast3d.py which is really there so that's not the problem. So we can keep this solution until someone finds something better. Thanks, Anna > > Maybe etc/gui/scripts/ needs to be added to PYTHONPATH with > > wxscripts = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'scripts') > if wxbase not in sys.path: > sys.path.append(wxbase) > > ? > (probably won't help, but worth a try) > > > > Hamish > >
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev