Hi all,
since I'm using threading and multiclients in SUMO with TraCI, I get "sometimes" the following problem:
Exception in thread TraciThread:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "D:\Repos\xy\abc\communication_traci_to_server.py", line 21, in runCommunication
self.connection2.simulationStep()
File "C:\Users\blub\PycharmProjects\abc\lib\site-packages\traci\connection.py", line 323, in simulationStep
result = self._sendExact()
File "C:\Users\blub\PycharmProjects\abc\lib\site-packages\traci\connection.py", line 102, in _sendExact
err = result.readString()
File "C:\Users\blub\PycharmProjects\abc\lib\site-packages\traci\storage.py", line 62, in readString
length = self.read("!i")[0]
File "C:\Users\blub\PycharmProjects\abc\lib\site-packages\traci\storage.py", line 37, in read
return struct.unpack(format, self._content[oldPos:self._pos])
struct.error: unpack requires a buffer of 4 bytes
So, there are three threads: starting the main connection of sumo(client 1), starting client 2 an starting a http server.
I'm also working with a queue to communicate between the client and the http server.
I'm only seeing, that something in the .simulationStep() of client 2 is wrong.
Any help or suggestions?
Thanks and greetings!