Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] KeyError : During the use of SumoNetVis

Dear Sir,

I am getting the following: 

Traceback (most recent call last):
  File "D:/SHARE/SumoNetVis-master/SumoNetVis-master/test.py", line 4, in <module>
    net = SumoNetVis.Net("test.net.xml")
  File "D:\SHARE\SumoNetVis-master\SumoNetVis-master\SumoNetVis\Net.py", line 624, in __init__
    lane = _Lane(laneObj.attrib)
  File "D:\SHARE\SumoNetVis-master\SumoNetVis-master\SumoNetVis\Net.py", line 141, in __init__
    self.id = attrib["id"]
KeyError: 'id'

Process finished with exit code 1

Code :
import SumoNetVis
import matplotlib.pyplot as plt
# Plot Sumo Network
net = SumoNetVis.Net("test.net.xml")
net.plot()

# Show figure
plt.show()

FYI I have used :

netconvert -s old.net.xml -o new.net.xml --numerical-ids.node-start 0

Please help.

--
:)
Bijal Varia

Back to the top