<div dir="ltr">Hi,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 18, 2013 at 11:30 PM, Hamish <span dir="ltr"><<a href="mailto:hamish_b@yahoo.com" target="_blank">hamish_b@yahoo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">Anna wrote:<br>
> I get this error when launching d.rast3d from layer manager<br>
> toolbar on Windows.<br>
> I fixed it in r57218 [1] but it I was wondering if there is<br>
> some better solution?<br>
</div>...<br>
<div class="im">> Traceback (most recent call last):<br>
</div>...<br>
<div class="im">> Unable to fetch interface description for command '<a href="http://d.rast3d.py" target="_blank">d.rast3d.py</a>'.<br>
</div>...<br>
> [1] <a href="http://trac.osgeo.org/grass/changeset/57218" target="_blank">http://trac.osgeo.org/grass/changeset/57218</a><br>
...<br>
> os.chdir(...)<br>
<br>
<br>
Hi,<br>
<br>
the "Unable to fetch interface description for command" error is typically<br>
because the g.parser script-handling module can not find the script that<br>
called it in the system $PATH.<br>
<br>
(error message happens in lib/python/script/task.py)<br>
<br>
The os.chdir() solution may work on Windows since "." is usually in %PATH%<br>
there, but on Unix "." is typically not in your path.<br>
<br>
I think it's better remove the os.chdir()s and replace them by adding<br>
$GISBASE/etc/gui/scripts/ to the PATH when the wxGUI first starts up.<br>
<br>
Going into the grass7 wxGUI's Python shell tab, and import os,<br>
os.getenv('PATH') shows the last entry as etc/gui/scripts/ already.<br>
(tested on linux)    :-/ so that might not be it.<br></blockquote><div><br></div><div>the command is launched with python executable:</div><div><br></div><div>.../python.exe <a href="http://d.rast3d.py">d.rast3d.py</a> </div>

<div><br></div><div>so it seems that it expects the full path to the script and therefore chdir before it made it work.</div><div>$GISBASE/etc/gui/scripts/  is already on the PATH.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
<br>
On linux the script is installed as "d.rast3d" without the .py, I guess<br>
it keeps the .py extension on Windows? perhaps check how the script is called: is e.g. '<a href="http://d.rast3d.py" target="_blank">d.rast3d.py</a>' requested but 'd.rast3d' found?<br></blockquote><div><br>

</div><div>there should be <a href="http://d.rast3d.py">d.rast3d.py</a> which is really there so that's not the problem.</div><div><br></div><div>So we can keep this solution until someone finds something better.</div>

<div><br></div><div>Thanks,</div><div>Anna</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
Maybe etc/gui/scripts/ needs to be added to PYTHONPATH with<br>
<br>
wxscripts = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'scripts')<br>
if wxbase not in sys.path:<br>
    sys.path.append(wxbase)<br>
<br>
?<br>
(probably won't help, but worth a try)<br>
<span class=""><font color="#888888"><br>
<br>
<br>
Hamish<br>
<br>
</font></span></blockquote></div><br></div></div>