Hi Jakob,

I need to use average SUMOs in my project,and I
use 
traci.start([sumoBinary,"--start","-c","data/cross.sumocfg","--tripinfo-output","/home/hzq/hzq_disk2/test_A3C_tripinfo/tripinfo_%s.xml"
% i_name]) to start SUMOs. And it works well,but, when I
use 
traci.load(["-c","data/cross.sumocfg","--tripinfo-output","/home/hzq/hzq_disk2/test_A3C_tripinfo/tripinfo_%s.xml"
% i_name]) the error below occurred.

 Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "A3C_discrete_action.py", line 196, in <lambda>
    job = lambda: worker.work()
  File "A3C_discrete_action.py", line 119, in work
    s = self.env.reset(self.name, GLOBAL_EP)
  File "/home/hzq/traffic-signal-control/test_A3C/trafficlight_env.py",
line 78, in reset

traci.load(["-c","data/cross.sumocfg","--tripinfo-output","/home/hzq/hzq_disk2/test_A3C_tripinfo/tripinfo_%s.xml"
% i_name])
  File "/home/hzq/sumo/tools/traci/__init__.py", line 111, in load
    return _connections[""].load(args)
  File "/home/hzq/sumo/tools/traci/connection.py", line 320, in load
    self._sendExact()
  File "/home/hzq/sumo/tools/traci/connection.py", line 101, in _sendExact
    err = result.readString()
  File "/home/hzq/sumo/tools/traci/storage.py", line 51, in readString
    return str(self.read("!%ss" % length)[0].decode("latin1"))
  File "/home/hzq/sumo/tools/traci/storage.py", line 35, in read
    return struct.unpack(format, self._content[oldPos:self._pos])
struct.error: unpack requires a bytes object of length 1245184

Could you please tell me how to fix it ?Thanks in advance!

Best regards,
Zhiqiang
_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

Reply via email to