[GRASS-user] Getting an error using r.mask in a GRASS shell script

Vaclav Petras wenzeslaus at gmail.com
Tue Jan 27 12:30:38 PST 2015


On Tue, Jan 27, 2015 at 3:04 PM, Thomas Adams <tea3rd at gmail.com> wrote:

> Vaclav,
>
> That was not a screen shot, just fg & bg colors of the text (I copied &
> pasted from my Mac term window — sorry for the embellishments).
>

I see it now. I was confused because it looks really bad at my end.


> The errors I have been getting is this:
>
> Traceback (most recent call last):
>   File "/usr/local/grass-7.0.0beta3/scripts/r.mask", line 71, in <module>
>     import grass.script as grass
> ImportError: No module named grass.script
>
>
"ImportError: No module named grass.script" means that Python does not see
package (grass.script or also grass). You miss the PYTHONPATH variable
which says where Python packages are:

export PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH"

See the following in case you are missing some other variable which would
be important for you (probably none now):

http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Bash_examples_.28GNU.2FLinux.29

If you would have a lot of problems with setting the environment, use
GRASS_BATCH_JOB variable with the grass command (see grass70 --help).

I hope this helps,
Vaclav

same result for RC1. My script is attached…
>
> Tom
>
>
> On Tue, Jan 27, 2015 at 12:57 PM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
>
>>
>> On Tue, Jan 27, 2015 at 12:00 PM, Thomas Adams <tea3rd at gmail.com> wrote:
>>
>>> Running as (1) is where I get the r.mask errors I have been seeing; I
>>> get the errors both when I simply remove any existing MASKs (r.mask -r) or
>>> where I attempt to set the MASK.
>>
>>
>> Can you please post again what are the errors. It is not clear from the
>> previous posts. Also, if you are posting script it is best to post a file,
>> not a screenshot, or just copy and paste the script to the email if it is
>> short enough.
>>
>> Thanks,
>> Vaclav
>>
>
>
>
> --
> Thomas E Adams, III
> 718 McBurney Drive
> Lebanon, OH 45036
>
> 1 (513) 739-9512 (cell)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150127/ee844ae2/attachment.html>


More information about the grass-user mailing list