Unable to understand reason for error IndexError: tuple index out of range - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Unable to understand reason for error IndexError: tuple index out of range (/thread-1155.html) |
Unable to understand reason for error IndexError: tuple index out of range - rajat2504 - Dec-08-2016 Hello this is my first post.I am getting the following error.. Quote:WARNING:tensorflow:From create_animation.py:207 in main.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02. The code is a bit long and I am unable to provide links here(until I prove I am not a spammer!). Please let me know if you like to see the code and how I can share it with you. This is an implementation of a research paper. I have copied this code from github and want to execute it so that I can gain deeper understanding of the concepts mentioned in the paper. I really need your help. Thanks in advance RE: Unable to understand reason for error - micseydel - Dec-08-2016 Are you able to reproduce the problem with fewer lines? You should be able to hard-code whatever variables the problem line depends on with 5-10 lines, and still reproduce the problem you're seeing. RE: Unable to understand reason for error - snippsat - Dec-08-2016 In line 153 this happens. >>> t = (1, 2, 3) >>> t[2] 3 >>> t[3] So you are trying to access a tuple value that has no index. So you have to check data(index) before it been used in this line.Simple print() can help to understand eg print([color=#333333][size=small]images_shape[2])[/size][/color] .
RE: Unable to understand reason for error - DennisT - Dec-08-2016 s/b t[0], t[1], and t[2] t[3] is beyond the range of the tuple thus the error. RE: Unable to understand reason for error IndexError: tuple index out of range - Kebap - Dec-09-2016 (Dec-08-2016, 06:55 PM)rajat2504 Wrote: I have copied this code from github and want to execute it so that I can gain deeper understanding of the concepts mentioned in the paper. If you did not code this yourself, you can file a bug report on github, so the author can review |