[GRASS-dev] GRASS 7: v.net.path and xml.etree.ElementTree ParseError

Markus Neteler neteler at osgeo.org
Thu May 23 09:34:59 PDT 2013


Hi,

trying out v.net.path on yesterday's GRASS 7 OSGeo4W, the command runs
through properly (correct result) but raises then an error:


echo 1 1 2 | v.net.path KAnet_HbfHs alayer=1 nlayer=2 out=shortpath_dist --o
WARNING: Il vettoriale <shortpath_dist> è già presente e sarà sovrascritto
Creando il grafico...
Registrando archi...
Flattening the graph...
Il grafico è stata creato
Si sta ricreando la topologia per il vettore <shortpath_dist at KA_net>...
Registrando primitive...
1 primitive registrate
140 vertici registrati
Costruendo aree...
0 aree create
0 isole create
Isole allegate...
Centroidi allegati...
Numero di nodi: 2
Numero di primitive:1
Numero di punti:0
Numero di linee:1
Numero di confini:0
Numero di centroidi:0
Numero di aree:0
Numero di isole:0
(Thu May 23 17:47:18 2013) Command finished (0 sec)
Traceback (most recent call last):
  File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython
\core\gconsole.py", line 647, in OnCmdDone

task = GUI(show=None).ParseCommand(event.cmd)
  File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\gui\wxpython
\gui_core\forms.py", line 2188, in ParseCommand

blackList = _blackList)
  File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\python\grass
\script\task.py", line 487, in parse_interface

tree = etree.fromstring(get_interface_description(name))
  File
"C:\OSGeo4W\apps\Python27\lib\xml\etree\ElementTree.py",
line 1300, in XML

parser.feed(text)
  File
"C:\OSGeo4W\apps\Python27\lib\xml\etree\ElementTree.py",
line 1642, in feed

self._raiseerror(v)
  File
"C:\OSGeo4W\apps\Python27\lib\xml\etree\ElementTree.py",
line 1506, in _raiseerror

raise err
xml.etree.ElementTree
.
ParseError
:
syntax error: line 1, column 0


Citing a related older wish:


On Wed, Jan 25, 2012 at 3:58 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> GRASS GIS wrote:
>
>>  xml.etree.ElementTree
>>  .
>>  ParseError
>>  :
>>  no element found: line 1, column 0
>
> Would someone mind fixing the code to generate a more meaningful error
> message when --interface-description fails (e.g. when the resulting
> string is empty or consists solely of whitespace)?
>

I wonder where the error comes from... happens on Linux as well. Perhaps
the pipe | is causing it?

Markus


More information about the grass-dev mailing list