DeepRL-Agents icon indicating copy to clipboard operation
DeepRL-Agents copied to clipboard

DRQN-AttributeError: 'zip' object has no attribute 'append'

Open silentobservers opened this issue 7 years ago • 2 comments

I run the code and meet a problem like this:


Target Set Success 5000 0.65 1 98%|█████████████████████████████████████████▏| 50/51 [00:00<00:00, 665.63it/s] Traceback (most recent call last): File "Deep_Recurrent_Q-Network.py", line 235, in summaryLength,h_size,sess,mainQN,time_per_step) File "/home/jimmy/desktop/tensorflowcode/DRL/helper.py", line 52, in saveToCenter images.append(bufferArray[-1,3]) AttributeError: 'zip' object has no attribute 'append'


I have no idea to solve it and need a help, my friends. Thanks a lot.

silentobservers avatar Jan 06 '18 14:01 silentobservers

same issue here. Running new macbook pro

Model Identifier: MacBookPro14,3 Processor Name: Intel Core i7 Processor Speed: 3.1 GHz Number of Processors: 1 Total Number of Cores: 4

paulsimvient avatar Feb 04 '18 20:02 paulsimvient

@silentobservers and @paulsimvient I suspect that you are running this with Python3, then the zip() returns an iterator see here: https://docs.python.org/3/library/functions.html#zip to fix this for Python3 you could change line 51 in helper.py to images = list(zip(bufferArray[:,0]))

thortom avatar Feb 10 '18 22:02 thortom