Closed ghost closed 5 years ago
Hi, try updating the pip packages and try again.
pip install -U --user -r requirements.txt
Thanks! I think we've fixed this error right away.
However, another error occurred, such as the link: https://github.com/PetterKraabol/Twitch-Chat-Downloader/issues/57 There was no input error in the video ID section. It may be annoying, but could you please confirm this error? Thank you so much.
I get the same error as #57 if I enter an invalid video ID, for instance by adding a space before it.
❯ python app.py
Video ID: 332918674
Traceback (most recent call last):
File "app.py", line 46, in <module>
main()
File "app.py", line 39, in main
app.download(app.arguments.video, app.arguments.format)
File "/home/petter/projects/Twitch-Chat-Downloader/app/downloader.py", line 24, in download
video: twitch.Video = twitch.Video(video_id)
File "/home/petter/projects/Twitch-Chat-Downloader/app/twitch/video.py", line 41, in __init__
video: helix.Video = helix.video(video_id)
File "/home/petter/.local/lib/python3.7/site-packages/twitch/helix/helix.py", line 36, in video
return helix.Videos(self.api(), video_ids=None, **kwargs)[0]
File "/home/petter/.local/lib/python3.7/site-packages/twitch/helix/videos.py", line 45, in __init__
self._api.get(self._path, params=kwargs)['data']]
KeyError: 'data'
I've added trimming for user inputs in f8a5a56d7eb1f8dd6f5775272281b8b650fe311f. Run git pull
to update.
The error comes from twitch-python, which currently lacks error handling.
It wasn't about spaces. But I solved the problem in a different way. Thank you for your quick response!
I found out the cause of the error. When installing a module listed in requirements.txt, a module named 'twitch' overlaps the name of the module previously installed. Do you know how to change a installed module name to unique? I Ask for help. Please understand that the sentence is uneven as it is using a translator.
Hi, twitch-python is imported with import twitch
.
If you have several Python packages that are imported with import twitch
, then you might want to look into virtual environment solutions like pipenv.
Pipenv helps you create an isolated python environment (virtual environment) to avoid import collision.
It works successfully. Thank you very much for your kind reply!
My python version is 3.7.1. Have you checked for errors regarding the following? I look forward to hearing from you.