docwza/sumolights

Error: tcpip::Socket::accept() Unable to create listening socket: Address already in use

Closed this issue · 1 comments

Hi, I am pleasure to read your paper and interested in your program project. I configure the running environment on Ubuntu18.04 and try to run the experiments. My experiment environment is as follows:
Ubuntu18.04, Anaconda3-5.3.1-Linux-x86_64.sh, python3.7.5, tensorflow1.14.0, matplotlib3.1.1, sumo-1.12.0.
When I run "./train_dqn.sh", there is an error as follow:
2022-04-22 22-40-36 的屏幕截图
I check the traci docs and don not find the connect() function. I add an configuration in .bashrc as "export LIBSUMO_AS_TRACI=1" and "source ~/.bashrc". But this error still exists.
I do not the reason of the problem. Could you help me?

I believe AttributeError is caused by the fact that you have set the LIBSUMO_AS_TRACI=1 which makes the traci.connect(port) unnecessary. Instead, you should just call traci.start(['sumo', '-c', PATH_TO_SUMO_CONFIG]) or unset the LIBSUMO_AS_TRACI environment variable and then you can use the connect function.

I'm going to mark this issue as resolved. If you still have the problem reopen an issue.