[GRASS-user] script by bash to Python
Gabriele N.
gis.gn at libero.it
Wed Sep 24 17:02:28 EDT 2008
A step forward :-)
I think that the letters with the accent in the code create problems. I
replaced the letters " è " with " e ' " and now the script v.to.dem.sh work.
Still does not go well: give me an error message when I launch (picture
attached) and does not work the STOP button........ but gives a result in
output.
Unfortunately, doing the same with other scripts I did not have the same
effect. I try to understand what other anomalies can be.
Thank you. I communicate further progress.
Gabriele
http://www.nabble.com/file/p19657956/Screenshot-Error%2Bin%2Bcommand%2Bexecution.png
Screenshot-Error+in+command+execution.png
Glynn Clements wrote:
>
>
> Gabriele N. wrote:
>
>> All my scripts in bash work with tcltk.
>>
>> Now, I take as example my 2 scripts: v.to.dem.sh and v.impact.sh.
>> With WxPython all the scripts were not working with grass 63. With
>> Grass64,
>> instead, some scripts works (es v.impact.sh) and some other scripts does
>> not
>> works (es.v.to.dem.sh). But I do not know what may be the characteristic
>> that makes v.impact.sh work and that does not work v.to.dem.sh.
>>
>> I hope to have been clearer.
>>
>> Thanks :-)
>>
>> Gabriele
>>
>> PS
>> The error is always the same. Here's an example:
>> GRASS 6.4.svn (gb2):~ > v.to.dem.sh
>> Traceback (most recent call last):
>> File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/menuform.py",
>> line 1687, in <module>
>> GrassGUIApp( grassTask( sys.argv[1] ) ).MainLoop()
>> File "/usr/local/grass-6.4.svn/etc/wxpython/gui_modules/menuform.py",
>> line 193, in __init__
>> xml.sax.parseString( getInterfaceDescription( grassModule ) ,
>> processTask( self ) )
>> File "/usr/lib/python2.5/xml/sax/__init__.py", line 49, in parseString
>> parser.parse(inpsrc)
>> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse
>> xmlreader.IncrementalParser.parse(self, source)
>> File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse
>> self.feed(buffer)
>> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 211, in feed
>> self._err_handler.fatalError(exc)
>> File "/usr/lib/python2.5/xml/sax/handler.py", line 38, in fatalError
>> raise exception
>> xml.sax._exceptions.SAXParseException: <unknown>:21:73: not well-formed
>> (invalid token)
>
> This indicates the the output from
>
> v.to.dem.sh --interface-description
>
> isn't valid XML.
>
> This is likely to be caused by the contents of the option descriptions
> at the top of the script (the #% lines).
>
> Does one of the entries have <unknown> as its value? If so, which
> field (gisprompt, label, etc) is it in?
>
> I suspect that the code which generates the XML data isn't always
> converting <, > and & to <, > and & when it should.
>
> You can work around the problem by using e.g. (unknown), but we should
> really fix this in the code which generates the XML.
>
> --
> Glynn Clements <glynn a gclements.plus.com>
> _______________________________________________
> grass-user mailing list
> grass-user a lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
--
View this message in context: http://www.nabble.com/script-by-bash-to-Python-tp18292175p19657956.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list