Hi, could you try, whether the error occurs more often when you add another client? Also can you check whether replacing _socket.send by _socket.sendall in traci.connection._sendExact helps?
Best regards, Michael Am 15.01.19 um 09:07 schrieb [email protected]: > 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! > > _______________________________________________ > sumo-user mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe from > this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
