-2

i want to run this sumo example (Tutorials/TraCI4Traffic Lights)

but when i try to run python runner.py i have this error

Traceback (most recent call last):
  File "C:\sumo-win32-0.29.0\sumo-0.29.0\docs\tutorial\traci_tls\runner.py", line 37, in <module>
    from sumolib import checkBinary
  File "C:\sumo-win32-0.29.0\sumo-0.29.0\tools\sumolib\__init__.py", line 37, in <module>
    from . import files, net, output, sensors, shapes
  File "C:\sumo-win32-0.29.0\sumo-0.29.0\tools\sumolib\net\__init__.py", line 37, in <module>
    from . import lane, edge, node, connection, roundabout
  File "C:\sumo-win32-0.29.0\sumo-0.29.0\tools\sumolib\net\lane.py", line 109
    raise ValueError, 'edge for this lane not yet defined'
                    ^
SyntaxError: invalid syntax

how can solve it?? thanks alot

Marc
  • 19,394
  • 6
  • 47
  • 51
neda
  • 1

1 Answers1

0

The error you see is because you run the script with python3, which is probably the default python on your system. SUMO 0.29 did not work well with python3 so either use a more recent SUMO version or start the script with python2 like

python2 runner.py
Michael
  • 3,510
  • 1
  • 11
  • 23
  • thank for your answer...can i unistall python 3 and install python 2 ?? i can chenge my sumo version because sumo 0.29.0 is compatible with my 0mnet 5.0 and veins 4.5 is it write when i have python 3 enter a code in terminal with python2 ...???? – neda Jan 23 '18 at 20:18
  • Yes, probably that is the easiest solution if you do not need python 3 for other programs. – Michael Jan 24 '18 at 09:35