> On Apr 19, 2017, at 11:41 AM, Jiyao Li <[email protected]> wrote: > > Dear Expert, > > I am using traCI, it works well under Python 2.7.11. but it doesn't work > under python 3.5.2, and the errors of prompt are below. So what's wrong > with it?
Not an expert, but… It looks like some exceptions in the code are not yet compatible with Python 3. Try changing the line to “raise ValueError(‘edge for this lane not yet defined’)” which should work with both Python 2 and Python 3. I’m sure the developers would welcome patches to adjust these statements throughout the code. hth - Tom > > Thanks, > Jiyao > > > > Traceback (most recent call last): > File "C:/sumo_traffic/tutorial/city_mobil/createNet.py", line 26, in > <module> > from constants import * > File "C:\sumo_traffic\tutorial\city_mobil\constants.py", line 49, in > <module> > from sumolib import checkBinary > File "C:\Program Files (x86)\DLR\Sumo\tools\sumolib\__init__.py", line > 37, in <module> > from . import files, net, output, sensors, shapes > File "C:\Program Files (x86)\DLR\Sumo\tools\sumolib\net\__init__.py", > line 37, in <module> > from . import lane, edge, node, connection, roundabout > File "C:\Program Files (x86)\DLR\Sumo\tools\sumolib\net\lane.py", line 109 > raise ValueError, 'edge for this lane not yet defined' > ^ > SyntaxError: invalid syntax > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
