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

ModuleNotFoundError #35

Closed
5 of 6 tasks
nicolaasjan opened this issue Jan 27, 2021 · 4 comments
Closed
5 of 6 tasks

ModuleNotFoundError #35

nicolaasjan opened this issue Jan 27, 2021 · 4 comments
Labels
cant-reproduce The issue cannot be reliably reproduced

Comments

@nicolaasjan
Copy link

nicolaasjan commented Jan 27, 2021

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running yt-dlp version 2021.01.27
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log


youtube-dlc -v -x -f bestaudio https://www.youtube.com/watch?v=UsYkLXycbYU
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/__init__.py", line 6, in <module>
ModuleNotFoundError: No module named 'youtube_dlc.extractor.lazy_extractors'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/youtube-dlc/__main__.py", line 16, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/__init__.py", line 45, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/__init__.py", line 13, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/extractors.py", line 58, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/anvato.py", line 12, in <module>
ModuleNotFoundError: No module named 'youtube_dlc.extractor.anvato_token_generator'

Description

When trying out the newest master branch to check out if thumbnails would get embedded in opus files, the above error was thrown at me...
Yes, I installed python3-mutagen.

Is this the same issue as animelover1984/youtube-dl#17 ?
And does it even work with Python version 3.6.9?
Previous youtube-dlc version:

youtube-dlc -v
[debug] User config file: /home/nico/.config/yt-dlp/config
[debug] User config: ['--list-formats-as-table', '-i', '-o', '~/Desktop/test-dlc/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--no-mtime', '--add-metadata', '--embed-thumbnail', '--force-ipv4']
[debug] Command-line config: ['-v']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.01.24-1
[debug] Python version 3.6.9 (CPython) - Linux-5.4.0-64-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-100550-gfde5593-Nico-20210104, ffprobe N-100550-gfde5593-Nico-20210104
[debug] Proxy map: {}
Usage: youtube-dlc [OPTIONS] URL [URL...]

youtube-dlc: error: You must provide at least one URL.
Type youtube-dlc --help to see a list of all options.

@nicolaasjan nicolaasjan changed the title preloadModuleNotFoundError ModuleNotFoundError Jan 27, 2021
@pukkandan
Copy link
Member

pukkandan commented Jan 28, 2021

They look like the same issue. But it works correctly for me. Can you confirm that the token generator exists in your copy of the source code?

Edit: Also found this: ytdl-org/youtube-dl#27449

@pukkandan pukkandan added the cant-reproduce The issue cannot be reliably reproduced label Jan 28, 2021
@nicolaasjan
Copy link
Author

They look like the same issue. But it works correctly for me. Can you confirm that the token generator exists in your copy of the source code?

Edit: Also found this: ytdl-org/youtube-dl#27449

Cloned a fresh copy just now to be sure.
The token generator exists (just like yesterday):
./yt-dlp/youtube_dlc/extractor/anvato_token_generator/__init__.py

youtube-dlc -v
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/__init__.py", line 6, in <module>
ModuleNotFoundError: No module named 'youtube_dlc.extractor.lazy_extractors'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/youtube-dlc/__main__.py", line 16, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/__init__.py", line 46, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/__init__.py", line 13, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/extractors.py", line 58, in <module>
  File "/usr/local/bin/youtube-dlc/youtube_dlc/extractor/anvato.py", line 12, in <module>
ModuleNotFoundError: No module named 'youtube_dlc.extractor.anvato_token_generator'


But when applying the new commit proposed here, it works again!

youtube-dlc -v
[debug] User config file: /home/nico/.config/yt-dlp/config
[debug] User config: ['--list-formats-as-table', '-i', '-o', '~/Desktop/test-dlc/%(title)s.%(ext)s', '-f', 'bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', '--no-mtime', '--add-metadata', '--embed-thumbnail', '--force-ipv4']
[debug] Command-line config: ['-v']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.01.28
[debug] Python version 3.6.9 (CPython) - Linux-5.4.0-64-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-100550-gfde5593-Nico-20210104, ffprobe N-100550-gfde5593-Nico-20210104
[debug] Proxy map: {}
Usage: youtube-dlc [OPTIONS] URL [URL...]

youtube-dlc: error: You must provide at least one URL.
Type youtube-dlc --help to see a list of all options.

@pukkandan
Copy link
Member

pukkandan commented Jan 28, 2021

I am trying to identify the root cause of this issue rather than just disabling the token generator all together. But I can't reproduce the issue. I tried python 2.7 and 3.6.9 in addition to 3.8.5 that I normally use. I also tried making a fresh clone. I am not getting the error in any of these cases. If I am unable to find a proper solution, I will just wrap the token generator in a try ... except

@pukkandan
Copy link
Member

Finally found the cause for this. It's an issue in the makefile! same as #3467

pukkandan added a commit that referenced this issue Apr 19, 2022
Closes #3467, #35

Authored by: putnam
nswanberg pushed a commit to nswanberg/yt-dlp that referenced this issue Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cant-reproduce The issue cannot be reliably reproduced
Projects
None yet
Development

No branches or pull requests

2 participants