IndexError: list index out of range (in like_history)
joshinils opened this issue · 3 comments
joshinils commented
since when i use python
i 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 commented
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 commented
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 commented
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