Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Error in connection handler #31

Open
BimwerxNZ opened this issue Dec 1, 2019 · 3 comments
Open

Error in connection handler #31

BimwerxNZ opened this issue Dec 1, 2019 · 3 comments

Comments

@BimwerxNZ
Copy link

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
Copy link

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 eclipse-sumo/sumo#6163)

@KangChou
Copy link

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

@gogo649
Copy link

gogo649 commented Apr 3, 2022

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants