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

[BUG] Twitch Chat Download broken #859

Closed
pchristod opened this issue Apr 15, 2023 · 4 comments · Fixed by #872
Closed

[BUG] Twitch Chat Download broken #859

pchristod opened this issue Apr 15, 2023 · 4 comments · Fixed by #872

Comments

@pchristod
Copy link

Describe the bug
Enabling the Twitch Chat Download (automatically) in the settings or downloading a Twitch Video, opening it and try to download Twitch chat will result in errors in the logfiles

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings, input ClientID and ClientSecret for Twitch Application, enable Twitch Chat Download
  2. Find some Twitch Video to Download
  3. See error in logiles, Twitch Video will download eventually however

Expected behavior
Twitch Chat will be downloaded as well

Screenshots

Environment

  • YoutubeDL-Material 4.3.1
  • Docker tag: Nightly

Additional context
Here's the relevant snippets from the logfile:

2023-04-15T09:28:21.712043354Z Error: Command failed: tcd --video 1794096313 --client-id xyz --client-secret xyz --format json -o appdata
2023-04-15T09:28:21.712663490Z Traceback (most recent call last):
2023-04-15T09:28:21.712823865Z File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir
2023-04-15T09:28:21.712894698Z self._accessor.mkdir(self, mode)
2023-04-15T09:28:21.712958911Z FileNotFoundError: [Errno 2] No such file or directory: '//.config/tcd'
2023-04-15T09:28:21.713017141Z During handling of the above exception, another exception occurred:
2023-04-15T09:28:21.713078946Z Traceback (most recent call last):
2023-04-15T09:28:21.713233063Z File "/usr/local/bin/tcd", line 8, in
2023-04-15T09:28:21.713318634Z sys.exit(main())
2023-04-15T09:28:21.713370514Z File "/usr/local/lib/python3.8/dist-packages/tcd/init.py", line 45, in main
2023-04-15T09:28:21.713428352Z Settings(Arguments().settings_file,
2023-04-15T09:28:21.713481324Z File "/usr/local/lib/python3.8/dist-packages/tcd/singleton.py", line 9, in call
2023-04-15T09:28:21.713554104Z cls._instances[cls] = super().call(*args, **kwargs)
2023-04-15T09:28:21.713611914Z File "/usr/local/lib/python3.8/dist-packages/tcd/settings.py", line 26, in init
2023-04-15T09:28:21.713670789Z self.config: Dict[str, Any] = self.load(filepath)
2023-04-15T09:28:21.713726674Z File "/usr/local/lib/python3.8/dist-packages/tcd/settings.py", line 42, in load
2023-04-15T09:28:21.713802038Z self.directory.mkdir(parents=True, exist_ok=True)
2023-04-15T09:28:21.713865531Z File "/usr/lib/python3.8/pathlib.py", line 1292, in mkdir
2023-04-15T09:28:21.713929274Z self.parent.mkdir(parents=True, exist_ok=True)
2023-04-15T09:28:21.713983704Z File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir
2023-04-15T09:28:21.714037336Z self._accessor.mkdir(self, mode)
2023-04-15T09:28:21.714088245Z PermissionError: [Errno 13] Permission denied: '//.config'
2023-04-15T09:28:21.714162792Z at ChildProcess.exithandler (node:child_process:399:12)
2023-04-15T09:28:21.714219961Z at ChildProcess.emit (node:events:526:28)
2023-04-15T09:28:21.714281394Z at maybeClose (node:internal/child_process:1092:16)
2023-04-15T09:28:21.714339924Z at Socket. (node:internal/child_process:451:11)
2023-04-15T09:28:21.714397388Z at Socket.emit (node:events:526:28)
2023-04-15T09:28:21.714467386Z at Pipe. (node:net:687:12) {
2023-04-15T09:28:21.714525484Z killed: false,
2023-04-15T09:28:21.714581740Z code: 1,
2023-04-15T09:28:21.714633832Z signal: null,
2023-04-15T09:28:21.714695708Z cmd: 'tcd --video 1794096313 --client-id xyz --client-secret xyz --format json -o appdata',
2023-04-15T09:28:21.714762125Z stdout: '',
2023-04-15T09:28:21.714835963Z stderr: 'Traceback (most recent call last):\n' +
2023-04-15T09:28:21.714893059Z ' File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir\n' +
2023-04-15T09:28:21.714950195Z ' self._accessor.mkdir(self, mode)\n' +
2023-04-15T09:28:21.715002298Z "FileNotFoundError: [Errno 2] No such file or directory: '//.config/tcd'\n" +
2023-04-15T09:28:21.715060735Z '\n' +
2023-04-15T09:28:21.715109089Z 'During handling of the above exception, another exception occurred:\n' +
2023-04-15T09:28:21.715164237Z '\n' +
2023-04-15T09:28:21.715214045Z 'Traceback (most recent call last):\n' +
2023-04-15T09:28:21.715265556Z ' File "/usr/local/bin/tcd", line 8, in \n' +
2023-04-15T09:28:21.715326680Z ' sys.exit(main())\n' +
2023-04-15T09:28:21.715381219Z ' File "/usr/local/lib/python3.8/dist-packages/tcd/init.py", line 45, in main\n' +
2023-04-15T09:28:21.715438344Z ' Settings(Arguments().settings_file,\n' +
2023-04-15T09:28:21.715491513Z ' File "/usr/local/lib/python3.8/dist-packages/tcd/singleton.py", line 9, in call\n' +
2023-04-15T09:28:21.715571971Z ' cls._instances[cls] = super().call(*args, **kwargs)\n' +
2023-04-15T09:28:21.715638359Z ' File "/usr/local/lib/python3.8/dist-packages/tcd/settings.py", line 26, in init\n' +
2023-04-15T09:28:21.715697777Z ' self.config: Dict[str, Any] = self.load(filepath)\n' +
2023-04-15T09:28:21.715915633Z ' File "/usr/local/lib/python3.8/dist-packages/tcd/settings.py", line 42, in load\n' +
2023-04-15T09:28:21.716005607Z ' self.directory.mkdir(parents=True, exist_ok=True)\n' +
2023-04-15T09:28:21.716068000Z ' File "/usr/lib/python3.8/pathlib.py", line 1292, in mkdir\n' +
2023-04-15T09:28:21.716128325Z ' self.parent.mkdir(parents=True, exist_ok=True)\n' +
2023-04-15T09:28:21.716186193Z ' File "/usr/lib/python3.8/pathlib.py", line 1288, in mkdir\n' +
2023-04-15T09:28:21.716250294Z ' self._accessor.mkdir(self, mode)\n' +
2023-04-15T09:28:21.716307639Z "PermissionError: [Errno 13] Permission denied: '//.config'\n"
2023-04-15T09:28:21.716399583Z }

If I had to guess I would say it's because that Twitch Chat Downloader that's being used is not maintained and Twitch changed the API to some degree as per the issues in the Repo https://github.com/PetterKraabol/Twitch-Chat-Downloader.
Migrating to a different version like TheDrHax's Fork could be a solution https://github.com/TheDrHax/Twitch-Chat-Downloader. I think this one is still working

Thanks for looking into it

Tzahi12345 added a commit that referenced this issue Apr 15, 2023
Changed tcd package to fix broken twitch downloads (#859)
@Tzahi12345
Copy link
Owner

I was hoping in #860 this would be resolved but it turns out it's not a drop-in replacement. Worse, I'm not even sure TheDrHax's fork is functional, at least in my tests. This feature might just have to be disabled until we get a possible solution.

One interesting product is TwitchDownloader. It's a GUI but there's a CLI version, and it has a chatdownload mode. Annoyingly it's different between x86 and ARM, we do already determine this in ffmpeg-fetch.sh.

Wish the repo had consistent release files but sometimes a version drops with only the Windows CLI, for example. So some logic would have to exist there. I'll see what I can do.

@Tzahi12345
Copy link
Owner

Decided to go ahead and try out my idea and it worked super well! #872 is up and fixes this issue :)

@pchristod
Copy link
Author

Hey @Tzahi12345
sorry, i actually thought the fork was usable due to the comments in the issue. My fault :(

Thank you for looking into it and fixing it another way! I will try it out with a new Docker Nightly build.

@Tzahi12345
Copy link
Owner

No problem! I should've verified anyways :)

I'll have to merge it before you can try it but I'll do that now

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

Successfully merging a pull request may close this issue.

2 participants