[GRASS-user] Problem with Python Scripts and grass.script (GRASS 6.5SVN) on Mac

Johannes Radinger JRadinger at gmx.at
Fri Apr 1 12:33:28 EDT 2011


Hello again,

I tried to figure out the problem with william kyngesburye.
the script is also working on his mac. I saved the script in the bin
folder and ran in the GRASS terminal:

GRASS 6.5.svn (gisdemo_ncspm):~ > testscript.py newmap=test elevation=elevation.10m geology=geology
Traceback (most recent call last):
 File "/Library/GRASS/6.5/Modules/bin/testscript.py", line 54, in <module>
   sys.exit(main())
 File "/Library/GRASS/6.5/Modules/bin/testscript.py", line 47, in main
   grass.mapcalc("${newmap} = ${elevation} * ${geology}",
AttributeError: 'module' object has no attribute 'mapcalc'


What causes this AttributeError?
Any ideas?

sys.path and $PYTHONPATH seems to be okay according to william.

/johannes


Am 01.04.2011 um 18:04 schrieb Glynn Clements:

> 
> Johannes Radinger wrote:
> 
>> strange that this script isn't working on my mac...
>> ..does it produce an outputmap on linux?
> 
> Yes.
> 
>> what can be the reason why I don't get an output
>> on my mac with current 6.5?
> 
> I don't know.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>



More information about the grass-user mailing list