[GRASS-dev] d.rast3d not launching on windows
Hamish
hamish_b at yahoo.com
Thu Jul 18 14:30:52 PDT 2013
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.
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?
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
More information about the grass-dev
mailing list