Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
silentobservers opened this issue Jan 6, 2018 · 2 comments
Open

Comments

@silentobservers
Copy link

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
Copy link

paulsimvient commented Feb 4, 2018

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
Copy link

thortom commented Feb 10, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants