Send grass-windows mailing list submissions to
        grass-windows@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/grass-windows
or, via email, send a message with subject or body 'help' to
        grass-windows-requ...@lists.osgeo.org

You can reach the person managing the list at
        grass-windows-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-windows digest..."


Today's Topics:

   1. compiling WINGrass Python Scripts - ExpatError (Johannes Radinger)
   2. compiling WINGrass Python Scripts - ExpatError (Johannes Radinger)
   3. Re: compiling WINGrass Python Scripts - ExpatError
      (Glynn Clements)


----------------------------------------------------------------------

Message: 1
Date: Mon, 05 Dec 2011 14:07:03 +0100
From: "Johannes Radinger" <jradin...@gmx.at>
Subject: [GRASS-windows] compiling WINGrass Python Scripts -
        ExpatError
To: grass-...@lists.osgeo.org, grass-windows@lists.osgeo.org
Message-ID: <20111205130703.244...@gmx.net>
Content-Type: text/plain; charset="utf-8"

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-0001.bin

------------------------------

Message: 2
Date: Mon, 05 Dec 2011 14:17:35 +0100
From: "Johannes Radinger" <jradin...@gmx.at>
Subject: [GRASS-windows] compiling WINGrass Python Scripts -
        ExpatError
To: grass-...@lists.osgeo.org, grass-windows@lists.osgeo.org
Message-ID: <20111205131735.137...@gmx.net>
Content-Type: text/plain; charset="utf-8"

Hi again,

just an update...
I checked my apps/GRASS65 folder in Osgeo4w and there are
also all the scripts (also the old ones which are already
removed from the source). There I found also the standard
module v.krige (also a python module) and when I try to call
it i get the same error as mentioned in the mail before...

So what may cause this problem?


/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/27524600/pythontest_l-0001.bin

------------------------------

Message: 3
Date: Mon, 5 Dec 2011 16:52:24 +0000
From: Glynn Clements <gl...@gclements.plus.com>
Subject: Re: [GRASS-windows] compiling WINGrass Python Scripts -
        ExpatError
To: "Johannes Radinger" <jradin...@gmx.at>
Cc: grass-...@lists.osgeo.org, grass-windows@lists.osgeo.org
Message-ID: <20188.63176.184885.759...@cerise.gclements.plus.com>
Content-Type: text/plain; charset=us-ascii


Johannes Radinger wrote:

> 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!!

It means that it tried to generate a wxPython GUI for the options, the
code which generates the GUI executed the command with the
--interface-description flag to get a list of the options in XML
format, then passed the output to the Expat XML parser. Unfortunately,
the command failed to execute, so no XML was generated, and Expat
complains about not receiving valid XML.

IOW, the error message is accurate but quite useless. To get useful
information, you'll need to run the script manually from the command
line. Try running it with the --help option initially.

-- 
Glynn Clements <gl...@gclements.plus.com>


------------------------------

_______________________________________________
grass-windows mailing list
grass-windows@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-windows


End of grass-windows Digest, Vol 62, Issue 1
********************************************

Reply via email to