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

IndexError: list index out of range (in like_history) #29

Open
joshinils opened this issue Dec 25, 2019 · 3 comments
Open

IndexError: list index out of range (in like_history) #29

joshinils opened this issue Dec 25, 2019 · 3 comments

Comments

@joshinils
Copy link

since when i use pythoni get this same error with the package _tkinter: #21,
i tried using python3, but alas:

nils@niels:~/YouTube-Report$ python3 report.py
Could not parse comments.
Traceback (most recent call last):
  File "report.py", line 33, in <module>
    like, all_likes = HTML().like_history()
  File "/home/nils/YouTube-Report/parse.py", line 107, in like_history
    link = r"https://www.youtube.com/watch?v=" + match_list[-1][11:]
IndexError: list index out of range

i have made sure to downlaod the report in english, that was a previous "mistake"

@MartinThoma
Copy link
Contributor

This part does not exist anymore. Could you please pull the latest master, check again and report the new bug? Or close the ticket if it's fixed.

@joshinils
Copy link
Author

yes, it still has the same error; I wasn't sure anymore where i cloned it from, but its from here;

nils@niels:~/YouTube-Report$ git remote get-url origin
https://github.com/A3M4/YouTube-Report
nils@niels:~/YouTube-Report$ git pull
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Total 14 (delta 4), reused 4 (delta 4), pack-reused 10
Entpacke Objekte: 100% (14/14), Fertig.
Von https://github.com/A3M4/YouTube-Report
   54e3f5f..943bf20  master     -> origin/master
Aktualisiere 54e3f5f..943bf20
Fast-forward
 parse.py  | 145 ++++++++++++++++++++++++---------------------------------------------------------------
 report.py |   2 +-
 2 files changed, 41 insertions(+), 106 deletions(-)
nils@niels:~/YouTube-Report$ python3 report.py 
Could not parse comments.
Traceback (most recent call last):
  File "report.py", line 33, in <module>
    like, all_likes = HTML().like_history()
  File "/home/nils/YouTube-Report/parse.py", line 88, in like_history
    link = r"https://www.youtube.com/watch?v=" + match_list[-1][11:]
IndexError: list index out of range

@joshinils
Copy link
Author

after installing python-tk, i can now run this with python2, but i still get an error:

nils@niels:~/YouTube-Report$ python report.py 
Traceback (most recent call last):
  File "report.py", line 20, in <module>
    from parse import HTML
  File "/home/nils/YouTube-Report/parse.py", line 16, in <module>
    class HTML:
  File "/home/nils/YouTube-Report/parse.py", line 17, in HTML
    html_watch = open(watch_history, "r", encoding="utf-8").read()
TypeError: 'encoding' is an invalid keyword argument for this function

with python3 it's still the same as above

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

2 participants