Youtube-dl and yt-dlp stopped working after update

Hello, I had youtube-dl and yt-dlp installed to download Youtube videos and they both worked perfectly, along with Youtube-dlg as a GUI
After the latest big update however I always get this error message, both on GUI and directly on command line

2022-07-28 21:45:50,282-DEBUG-Worker_1-Traceback (most recent call last):
2022-07-28 21:45:50,282-DEBUG-Worker_1-  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
2022-07-28 21:45:50,283-DEBUG-Worker_1-    return _run_code(code, main_globals, None,
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
2022-07-28 21:45:50,283-DEBUG-Worker_1-    exec(code, run_globals)
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/home/m/.config/yt-dlg/yt-dlp/__main__.py", line 16, in <module>
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/home/m/.config/yt-dlg/yt-dlp/yt_dlp/__init__.py", line 919, in main
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/home/m/.config/yt-dlg/yt-dlp/yt_dlp/__init__.py", line 881, in _real_main
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/home/m/.config/yt-dlg/yt-dlp/yt_dlp/YoutubeDL.py", line 724, in __init__
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/home/m/.config/yt-dlg/yt-dlp/yt_dlp/YoutubeDL.py", line 715, in preload_download_archive
2022-07-28 21:45:50,283-DEBUG-Worker_1-  File "/usr/lib/python3.10/codecs.py", line 322, in decode
2022-07-28 21:45:50,283-DEBUG-Worker_1-    (result, consumed) = self._buffer_decode(data, self.errors, final)
2022-07-28 21:45:50,283-DEBUG-Worker_1-UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 6739: invalid start byte
2022-07-28 21:45:50,283-DEBUG-Worker_1-Child process exited with non-zero code: 1

I’m not very technical or familiar with Python but it seems like something in Python stopped working after the latest update. Tried uninstalling an reinstalling the programs, tried removing old youtube-dl and keeping only yt-dlp, tried reinstalling python 3.10.5-1 but always get the same error. Can anyone help me?

Try forcing a rebuild of those PKGBUILDs, as well as other packages installed from the AUR.

Both youtube-dl and yt-dlp are in the official repositories

Snap. You’re right. I was thinking of gallery-dl.

Just tried on two different machines, fully updated on the Stable branch, and yt-dlp continues to work like normal.

Can you try with a fresh config folder? Rename the old config folder and let it generate a new one?

mv -v ~/.config/yt-dlg ~/.config/yt-dlg.bak

Didn’t work.
I have found out thought that it’ll work with no options set, only “yt-dlp [link to video]” however when i use it with extra options it won’t work when it worked fine yesterday.

yt-dlp https://www.youtube.com/watch?v=hLiPZkuL2Yc

works

yt-dlp --newline -i -o "/run/media/m/Expansion/letsplay/%(uploader)s - -%(title)s" -f 18 --ignore-config --hls-prefer-native --download-archive /run/media/m/Expansion/letsplay/playlist.txt --continue --no-overwrites "https://www.youtube.com/watch?v=hLiPZkuL2Yc"

Doesn’t work

Edit: by testing all options I found out what’s causing the issue is the --download-archive option that writes the id of the video into a text file (so it won’t download the same video again and I don’t have to download again an entire playlist if an error occurs.

1 Like

The last line of the playlist of the --download-archive option was causing the issue for some reason. It looked weird, different than the other lines. I deleted it and now it’s working again. Thanks for the time, winnie.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.