Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Disconnect with Traci

Dear sumo-users:
        I am doing a traffic light program to optimize the timing of traffic light by using Traci.But I met a problem,I need to simulate the process again and again,then,I got this error:
        

Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 2 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 3 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 4 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 5 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 6 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 7 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 8 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 9 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
 Retrying in 10 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
Traceback (most recent call last):
  File "main.py", line 78, in <module>
    train(RL_natural)
  File "main.py", line 26, in train
    observation = env.reset()
  File "/home/huzhiqiang/traffic-signal-control/traci_tls_PER_8s_lr0.00025/trafficlight_env.py", line 110, in reset
    "--tripinfo-output", "tripinfo.xml"])
  File "/home/huzhiqiang/sumo/tools/traci/__init__.py", line 86, in start
    _connections[label] = connect(port, numRetries, "localhost", sumoProcess)
  File "/home/huzhiqiang/sumo/tools/traci/__init__.py", line 64, in connect
    raise FatalTraCIError("Could not connect in %s tries" % (numRetries + 1))
traci.exceptions.FatalTraCIError: Could not connect in 11 tries

How can I fix it?

Best regards,
Zhiqiang


Back to the top