Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Problem with xml2protobuf.py

Hello,

 I am trying to use xml2protobuf.py
 I am using git bash and I executed this command:

py -2 /c/Program\ Files\ \(x86\)/Eclipse/Sumo/tools/xml/xml2protobuf.py in-test.con.xml -o out -x xsd/netconvertConfiguration.xsd
I get these errors:

Traceback (most recent call last):
File "C:/Program Files (x86)/Eclipse/Sumo/tools/xml/xml2protobuf.py", line 199, in <module>
    main()
File "C:/Program Files (x86)/Eclipse/Sumo/tools/xml/xml2protobuf.py", line 195, in main
    xml.sax.parse(options.source, handler)
  File "C:\Python27\lib\xml\sax\__init__.py", line 33, in parse
    parser.parse(source)
  File "C:\Python27\lib\xml\sax\expatreader.py", line 110, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python27\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:\Python27\lib\xml\sax\expatreader.py", line 213, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Python27\lib\xml\sax\expatreader.py", line 317, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
File "C:/Program Files (x86)/Eclipse/Sumo/tools/xml/xml2protobuf.py", line 67, in startElement
    self.emptyRootMsg = vars(self.module)[capitalFirst(name)]()
KeyError: u'Connections'

Notice that I use python 2.7 and I have installed google.protobuf module. I also copied xsd folder to my working directory.

 Am I doing something wrong?

Thank you,
Tom


Back to the top