Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Connection error [WinError 10061]

Hello (again),

I managed to solve it since I wrote the request.

The file path for the SUMO network was incorrect, so it couldn’t be found.

After correcting it, everthing works fine.

 

Maybe this can help in the future if sb stumbles upon a similar error message.

 

Regards,

Liesa Zimmermann

 

 

Von: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> Im Auftrag von Zimmermann, Liesa
Gesendet: Dienstag, 20. Oktober 2020 13:40
An: sumo-user@xxxxxxxxxxx
Betreff: [sumo-user] Connection error [WinError 10061]

 

Hello,

I am trying to interface with SUMO from Python, following the steps in the documentation:

https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html

 

Sumo opens, without opening the sumocfg-file and I get the error:

 

Retrying in 1 seconds

Could not connect to TraCI server at localhost:51329 [WinError 10061] No connection could be made because the target machine actively refused it

 

I checked the firewall as suggested in the mailing list (27 Aug 2017 on a similar issue) and turned it off, but it did not work. Running as admin changed nothing either.

I’m using SUMO 1.7 on Windows 10.

 

The script I used (from the documentation):

import os

import sys

sys.path.append("C:/Program Files (x86)/Eclipse/SUMO 1.7/tools")

import traci

 

sumoBinary = "C:/Program Files (x86)/Eclipse/SUMO 1.7/bin/sumo-gui"

FolderPath = "C:/Users/garaw/Desktop/SUMO-Unity3D-connection-master/SUMO_Networks"

sumoCmd = [sumoBinary, "-c", FolderPath + "Network_01.sumocfg"]

traci.start(sumoCmd)

step = 0

while step < 1000:

    traci.simulationStep()

    if traci.inductionloop.getLastStepVehicleNumber("0") > 0:

        traci.trafficlight.setRedYellowGreenState("0", "GrGr")

    step += 1

 

traci.close()

 

Thanks for your help.

Regards,

Liesa Zimmermann

 

 


Back to the top