Johannes,

Looking at your Python code and the error, I expect the issue is with the way 
you are calling the script, rather than it's content.

From the documentation, g.parser returns a Python dictionary. The options 
"command" is a variable, rather than a function.

http://grass.osgeo.org/grass64/manuals/html64_user/g.parser.html

The key error occurs when you attempt to access a key, in your case 
upstream_shreve, when it does not exist.

http://wiki.python.org/moin/KeyError

I suspect the problem is that you're not setting a value for upstream_shreve 
from the command line, i.e.,

./test3.py upstream_shreve=newmapname upstream_part=upstreammap 
shreve=anothermap

In your Python script, if you throw in:

print options

You'll be able to quickly check it contains the key-value pairs you expect.

Hope this helps,
Josh.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to