awjuliani / DeepRL-Agents

A set of Deep Reinforcement Learning Agents implemented in Tensorflow.
MIT License
2.24k stars 826 forks source link

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

Open silentobservers opened 6 years ago

silentobservers commented 6 years ago

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.

paulsimvient commented 6 years ago

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

thortom commented 6 years ago

@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]))