[GRASS-windows] compiling WINGrass Python Scripts - ExpatError

Johannes Radinger JRadinger at gmx.at
Mon Dec 5 08:07:03 EST 2011


Hello,

I use the approach as recommended in the wiki to compile 
GRASS 6.5 SVN (newest revision 49546) in Windows 7 with msys and the osgeo4w setup etc.
Additionally I want to compile the sourece together with 
my own python script. The script itself is very simple and
just for testing (script directory with Makefile is attached).
The script is working as I tested it on my Mac (also compiled
from source). I put the script folder with the description.html
and the Makefile into the script folder and adapted the
Makefile.

It seems that the compilation was successful as there were no
Errors detected and I can start GRASS by calling it via msys.

So far so good, but when I want to call my python script I run
into troubles. I type script.py and get following error:

''''''''''''''''''''''''''''''''''''''''''''
Traceback (most recent call last):
  File "c:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\prompt.py", line 1109, in OnKeyPressed

self.parent.RunCmd(cmd)
  File "c:\OSGeo4W\apps\grass\grass-6.5.svn\etc\wxpython\gui
_modules\goutput.py", line 549, in RunCmd

task = gtask.parse_interface(command[0])
  File "c:/osgeo4w/usr/src/grass-6.5.svn/dist.i686-pc-
mingw32/etc/python/grass/script/task.py", line 457, in
parse_interface

tree = etree.fromstring(get_interface_description(name))
  File
"c:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py",
line 964, in XML

return parser.close()
  File
"c:\OSGeo4W\apps\Python25\lib\xml\etree\ElementTree.py",
line 1254, in close

self._parser.Parse("", 1) # end of data
xml.parsers.expat
.
ExpatError
:
no element found: line 1, column 0
''''''''''''''''''''''''''''

I don't know what that exactly means?? I tried to compile the script with two different line endings (UNIX coding and Windows coding) but with similar result. So I don't know what is causing the problem!!

Another thing I realized: I tried to remove the script from the source (the folder and removed the line from the Makefile). I also ran make distclean and removed the configure stamp and then I recompiled GRASS 6.5 without the script. Although I can "call" the script or lets say I get still the same error like before... but if I try to call any weird script (nonexisting.py) I get: 'nonexisting.py' is not recognized as an internal or external command, operable program or batch file.
So it seems that there are remainings of my script although removed from the source an recompiled...strange or not???

Hopefully someone can help,

best regards
Johannes
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pythontest_l.zip
Type: application/x-zip-compressed
Size: 1236 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-windows/attachments/20111205/f698509e/pythontest_l.bin


More information about the grass-windows mailing list