[GRASS-user] Error in pansharp tool: missing grass.script

Vaclav Petras wenzeslaus at gmail.com
Wed Jun 24 06:09:09 PDT 2015


Hi Andrea,

i.pansharpen runs for me with 7.0 svn branch.

On Wed, Jun 24, 2015 at 7:03 AM, Andrea Peri <aperi2007 at gmail.com> wrote:

> Hi to all,
>
> using the pansharp tool I have this error:
>
> Traceback (most recent call last):
>   File "/usr/local/grass-7.0.0/scripts/i.pansharpen", line 91, in <module>
>     import grass.script as grass
> ImportError: No module named grass.script
>

>From this I would say that you invoke it outside of GRASS session but I
guess that's not the case.


> Traceback (most recent call last):
>   File "/usr/local/grass-7.0.0/scripts/i.pansharpen", line 91, in <module>
>     import grass.script as grass
> ImportError: No module named grass.script
> Traceback (most recent call last):
>   File "/usr/local/grass-7.0.0/scripts/i.pansharpen", line 91, in <module>
>     import grass.script as grass
> ImportError: No module named grass.script
>

However, this seems like some strange recursion.


> I guess this is an issue.
>

It seems like one. I think it might help, at least help to debug, if you
replace "import grass.script as grass" by "import grass.script as gscript"
and "grass." by "gscript.". I think this change should be done anyway in
all source code. (You can edit the file, it's a Python script and then send
result of diff -u oldfile newfile.)


> If confirmed I could open a ticket.
>

Try what I said above and submit it with a patch if you feel up to it.


>
> Many thx.
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150624/fda8c9d9/attachment.html>


More information about the grass-user mailing list