sidewalklabs / sumo-web3d

Web-based 3D visualization of SUMO microsimulations using TraCI and three.js.
Eclipse Public License 2.0
163 stars 64 forks source link

Error in connection handler #31

Open BimwerxNZ opened 4 years ago

BimwerxNZ commented 4 years ago

Server starts successfully but I get an error when attempting to load a model (any model):

Error in connection handler Traceback (most recent call last): File "C:\Python\Python38-32\lib\site-packages\websockets\server.py", line 192, in handler await self.ws_handler(self, path) File "C:\Dev\Traffic\SUMO\sumo-web3d-master\sumo-web3d-master\sumo_web3d\server\server.py", line 313, in websocket_simulation_control sumo_start_fn() File "C:\Dev\Traffic\SUMO\sumo-web3d-master\sumo-web3d-master\sumo_web3d\server\server.py", line 578, in lambda: sumo_start_fn(getattr(current_scenario, 'config_file')), File "C:\Dev\Traffic\SUMO\sumo-web3d-master\sumo-web3d-master\sumo_web3d\server\server.py", line 347, in start_sumo_executable for light_id in traci.trafficlights.getIDList(): AttributeError: module 'traci' has no attribute 'trafficlights'

Any ideas as to why and how to fix?

mlclemente commented 4 years ago

this error can easily be fixed by replacing in file server.py all occurrences of trafficlights with trafficlight, (without the final s), because this is the module's new name in SUMO (see also https://github.com/eclipse/sumo/issues/6163)

KangChou commented 3 years ago

TypeError: Only async functions are allowed as web-handlers , got functools.partial(<function send_as_http_response..func_wrapper at 0x7f00fe1535f0>

gogo649 commented 2 years ago

I got the same error when load a model(bologna-acosta): my sumo version is 1.13.0

Executing /usr/local/opt/sumo/share/sumo/bin/sumo -c /Users/yuanjianhua/projects/py_ws/sumo/sumo-web3d/sumo_web3d/scenarios/bologna-acosta/run.sumo.cfg Retrying in 1 seconds Loading configuration ... done. Error in connection handler Traceback (most recent call last): File "/Users/yuanjianhua/projects/py_ws/sumo/sumo-web3d/sumo/lib/python3.6/site-packages/websockets/legacy/server.py", line 293, in handler await self.ws_handler(self, path) File "/Users/yuanjianhua/projects/py_ws/sumo/sumo-web3d/sumo/lib/python3.6/site-packages/sumo_web3d/server/server.py", line 309, in websocket_simulation_control sumo_start_fn() File "/Users/yuanjianhua/projects/py_ws/sumo/sumo-web3d/sumo/lib/python3.6/site-packages/sumo_web3d/server/server.py", line 565, in <lambda> lambda: sumo_start_fn(getattr(current_scenario, 'config_file')), File "/Users/yuanjianhua/projects/py_ws/sumo/sumo-web3d/sumo/lib/python3.6/site-packages/sumo_web3d/server/server.py", line 343, in start_sumo_executable for light_id in traci.trafficlights.getIDList(): AttributeError: module 'traci' has no attribute 'trafficlights'

Any ideas as to why and how to fix?