[GRASS-user] python module under wingrass7
Glynn Clements
glynn at gclements.plus.com
Tue Dec 14 18:28:43 EST 2010
gianluca.massei wrote:
> well, may be I'm very boring... but I can't solve my problem!
> Now if I run my script I get this message:
> GRASS 7.0.svn> r.mcda.roughset.py
> self._parser.Parse("", 1) # end of data
> xml.parsers.expat.ExpatError: no element found: line 1, column 0
This usually indicates that running the script with the
--interface-description flag failed to generate an XML interface
description.
Ensure that the script has the module and option descriptions at the
top of the file and the grass.parser() call at the bottom of the file:
if __name__ == "__main__":
options, flags = grass.parser()
main()
with nothing else at the top-level (outside of any function
defintion).
If that isn't sufficient, check that that the .py extension is
registered correctly. You should be able to "execute" a Python script
from the Windows command prompt by typing its name.
> File "C:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py", line
If the extension is registered to an official version of Python, I
suggest that you don't change that, but manually edit the startup
scripts to use the official version rather than the OSGeo4W version.
You may need to install wxPython, NumPy and/or PyWin32.
If the extension isn't registered at all, I suggest installing Python
using the installer from python.org, then following the above
paragraph.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list