Hi,

I am trying to convert the xml files obtained from netstate-dump and
fcd-output to csv using the python script "xml2csv.py" (
https://sumo.dlr.de/wiki/Tools/Xml#xml2csv.py). However, I get an error for
both files which goes as follows:

------
 File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/expatreader.py",
line 217, in feed
    self._parser.Parse(data, isFinal)
xml.parsers.expat.ExpatError: unclosed token: line 938516, column 8

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/sumo/tools/xml/xml2csv.py", line 275, in <module>
    main()
  File "/usr/share/sumo/tools/xml/xml2csv.py", line 262, in main
    attrFinder = AttrFinder(options.xsd, options.source, options.split)
  File "/usr/share/sumo/tools/xml/xml2csv.py", line 82, in __init__
    xml.sax.parse(source, self)
  File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/__init__.py",
line 33, in parse
    parser.parse(source)
  File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/expatreader.py",
line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/xmlreader.py",
line 127, in parse
    self.close()
  File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/expatreader.py",
line 240, in close
    self.feed("", isFinal = 1)
  File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/expatreader.py",
line 221, in feed
    self._err_handler.fatalError(exc)
  File
"/home/amedury/anaconda3/envs/tracking/lib/python3.6/xml/sax/handler.py",
line 38, in fatalError
    raise exception
xml.sax._exceptions.SAXParseException: netstate_dump.xml:938516:8: unclosed
token
---------

I was wondering if someone can suggest potential debugging options and/or
alternatives to store the output from SUMO as csv directly. The wiki
mentions that the script can listen in to incoming connections and
facilitate writing files to csv directly, but I was not able to understand
the instructions very well.

Any help would be much appreciated.

Thanks!

Aditya
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to