Cant Purge Or Use yt-dlp

Bug #2024967 reported by Sameer Sharma
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
yt-dlp (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Hey there recently after using pyinstaller installed from pip, the system repo installed yt-dlp misbehaves and wont work when downloading videos it reports cant write etc.

'''
[youtube] GaE01NCDNkw: Downloading webpage
[youtube] GaE01NCDNkw: Downloading android player API JSON
[youtube] GaE01NCDNkw: Downloading player b7910ca8
WARNING: [youtube] nsig extraction failed: You may experience throttling for some formats
n = pVX8RViV-RiArPV ; player = https://www.youtube.com/s/player/b7910ca8/player_ias.vflset/en_US/base.js
GaE01NCDNkw: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/youtube.py", line 2517, in _decrypt_nsig
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/youtube.py", line 2543, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/youtube.py", line 2531, in _extract_n_function_name
    return json.loads(js_to_json(self._search_regex(
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/common.py", line 1229, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
yt_dlp.utils.RegexNotFoundError: Unable to extract Initial JS player n function list (Usa.0); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
 (caused by RegexNotFoundError('Unable to extract \x1b[0;94mInitial JS player n function list (Usa.0)\x1b[0m; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U')); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
WARNING: [youtube] nsig extraction failed: You may experience throttling for some formats
n = txEYOXgCHPgTDzD ; player = https://www.youtube.com/s/player/b7910ca8/player_ias.vflset/en_US/base.js
GaE01NCDNkw: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/youtube.py", line 2517, in _decrypt_nsig
    self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/youtube.py", line 2543, in _extract_n_function
    funcname = self._extract_n_function_name(jscode)
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/youtube.py", line 2531, in _extract_n_function_name
    return json.loads(js_to_json(self._search_regex(
  File "/usr/lib/python3/dist-packages/yt_dlp/extractor/common.py", line 1229, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
yt_dlp.utils.RegexNotFoundError: Unable to extract Initial JS player n function list (Usa.0); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
 (caused by RegexNotFoundError('Unable to extract \x1b[0;94mInitial JS player n function list (Usa.0)\x1b[0m; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U')); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
ERROR: [youtube] GaE01NCDNkw: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
```

In an attempt to fix this i tried purging yt-dlp but was met with the following error :

```
E: Unable to locate package yt-dlp recipie.txt
```

** Although (purge yt-dlp) works fine but reinstalling etc. has no effect the problem persists.

Sys-info:

```
Description: Ubuntu 22.04.2 LTS
Release: 22.04
```

Package version:

```
yt-dlp:
  Installed: 2022.04.08-1
  Candidate: 2022.04.08-1
  Version table:
     2023.03.04-1~bpo22.04.1 100
        100 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages
        100 http://archive.ubuntu.com/ubuntu jammy-backports/universe i386 Packages
 *** 2022.04.08-1 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu jammy/universe i386 Packages
        100 /var/lib/dpkg/status
```

Revision history for this message
Unit 193 (unit193) wrote :

For the first issue, it seems like you are hitting https://github.com/yt-dlp/yt-dlp/issues/6247 which was fixed in yt-dlp 2023.02.17 and above. If you'll note your 'apt-cache policy' output, there's a version higher than that ready to install, simply select it with `sudo apt install -t jammy-backports yt-dlp`.

For the second issue, apt returns the error "E: Unable to locate package yt-dlp recipie.txt" which shows you passed it "yt-dlp recipie.txt" as the package name, which obviously isn't correct. Correct your command for removal and it should work.

Lastly, pip can interfere with system installed packages, since you are mixing package managers. I believe generally you're advised to use venvs instead. If using pip and it breaks your system packages, you get to keep both pieces.

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 2024967

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

I've marked this report as 'incomplete', you can return status to 'new' once apport-collect has been run on your impacted box & details can be seen.

For help on using backports (to get newer packages), please use a support site of your choice. I suspect a Support site would be more appropriate, eg. https://answers.launchpad.net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org, or for more support options please look at https://discourse.ubuntu.com/t/community-support/709

Changed in yt-dlp (Ubuntu):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.