Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] traci.exceptions.FatalTraCIError and struct.error

Hi,

that worked. Thank you so much.

On Mon, Jan 4, 2021 at 11:06 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
Instead call

traci.start([checkBinary('sumo'), "-c", "config.sumocfg", "--step-length", "0.5", '--save-state.rng', "--step-method.ballistic", "--load-state", 'saved_simulation'], port=64600)


Am Mo., 4. Jan. 2021 um 21:37 Uhr schrieb . Abdullah <ab11@xxxxxxxxxxx>:
Hi,

I did try setting the port in the following command : traci.start([checkBinary('sumo'), "-c", "config.sumocfg", "--remote-port", "64600", "--step-length", "0.5", '--save-state.rng', "--step-method.ballistic", "--load-state", 'saved_simulation']) 

But I get an error that says, "Error: A value for the option 'remote-port' was already set."

I am starting simulations from saved states 

On Mon, Jan 4, 2021 at 3:24 AM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
traci.start tries to find an unused port. Possibly, you are creating so many simulations that this fails and two simulations try to use the same port.
One work-around could be to manage ports yourself and set them explicitly in traci.start.

Am Mi., 23. Dez. 2020 um 18:59 Uhr schrieb . Abdullah <ab11@xxxxxxxxxxx>:
Hi,

I was running multiple simulations together, sometimes simultaneously and some of mine simulation ends with either one of the two errors:

Error 1:

traci.start([checkBinary('sumo'), "-c", "config.sumocfg", "--step-length", "0.5", '--save-state.rng', "--step-method.ballistic", "--no-step-log", "--no-warnings", "--load-state", 'saved_simulation'])
  File "/home/ab11/sumo/tools/traci/main.py", line 158, in start
    return init(sumoPort, numRetries, "localhost", label, sumoProcess)
  File "/home/ab11/sumo/tools/traci/main.py", line 136, in init
    _connections[label] = connect(port, numRetries, host, proc)
  File "/home/ab11/sumo/tools/traci/main.py", line 127, in connect
    raise FatalTraCIError("Could not connect in %s tries" % (numRetries + 1))
traci.exceptions.FatalTraCIError: Could not connect in 11 tries


Error 2:

traci.start([checkBinary('sumo'), "-c", "config.sumocfg", "--step-length", "0.5", '--save-state.rng', "--step-method.ballistic", "--no-step-log", "--no-warnings", "--load-state", 'saved_simulation'])
  File "/home/ab11/sumo/tools/traci/main.py", line 158, in start
    return init(sumoPort, numRetries, "localhost", label, sumoProcess)
  File "/home/ab11/sumo/tools/traci/main.py", line 138, in init
    return getVersion()
  File "/home/ab11/sumo/tools/traci/main.py", line 246, in getVersion
    return _connections[""].getVersion()
  File "/home/ab11/sumo/tools/traci/connection.py", line 345, in getVersion
    result = self._sendCmd(command, None, None)
  File "/home/ab11/sumo/tools/traci/connection.py", line 178, in _sendCmd
    return self._sendExact()
  File "/home/ab11/sumo/tools/traci/connection.py", line 90, in _sendExact
    prefix = result.read("!BBB")
  File "/home/ab11/sumo/tools/traci/storage.py", line 40, in read
    return struct.unpack(format, self._content[oldPos:self._pos])
struct.error: unpack requires a buffer of 3 bytes


I cannot seem to figure out why this happens. If anyone can give a little insight on them, then it would be great.

--
Thank you.
Abdullah
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
Thank you.
Abdullah
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
Thank you.
Abdullah

Back to the top