question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error since commit 43cc91a

See original GitHub issue

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2022.04.08 (update instructions) or later (specify commit)
  • 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 issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Description

After commit 43cc91a, I get the error shown in the verbose log.

Verbose log

yt-dlp -Uv
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/yt-dlp/__main__.py", line 13, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/usr/local/bin/yt-dlp/yt_dlp/__init__.py", line 12, in <module>
ModuleNotFoundError: No module named 'yt_dlp.compat'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
putnamcommented, Apr 19, 2022

The Makefile kind of looks like it needs a total rewrite, but this will fix it:

diff --git a/Makefile b/Makefile
index b6cb27bb0..7ed2eae59 100644
--- a/Makefile
+++ b/Makefile
@@ -59,15 +59,15 @@ test:
 offlinetest: codetest
        $(PYTHON) -m pytest -k "not download"
 
-yt-dlp: yt_dlp/*.py yt_dlp/*/*.py
+yt-dlp: yt_dlp/*.py yt_dlp/*/*.py yt_dlp/*/*/*.py
        mkdir -p zip
-       for d in yt_dlp yt_dlp/downloader yt_dlp/extractor yt_dlp/postprocessor ; do \
+       for d in yt_dlp yt_dlp/downloader yt_dlp/extractor yt_dlp/postprocessor yt_dlp/compat yt_dlp/compat/asyncio ; do \
          mkdir -p zip/$$d ;\
          cp -pPR $$d/*.py zip/$$d/ ;\
        done
-       touch -t 200001010101 zip/yt_dlp/*.py zip/yt_dlp/*/*.py
+       touch -t 200001010101 zip/yt_dlp/*.py zip/yt_dlp/*/*.py zip/yt_dlp/*/*/*.py
        mv zip/yt_dlp/__main__.py zip/
-       cd zip ; zip -q ../yt-dlp yt_dlp/*.py yt_dlp/*/*.py __main__.py
+       cd zip ; zip -q ../yt-dlp yt_dlp/*.py yt_dlp/*/*.py yt_dlp/*/*/*.py __main__.py
        rm -rf zip
        echo '#!$(PYTHON)' > yt-dlp
        cat yt-dlp.zip >> yt-dlp
0reactions
pukkandancommented, Apr 19, 2022

I could do better on this make action using tools like find, but that would add a dependency, probably breaking the yt-dlp install for someone. That’s a classic problem with makefiles.

find is an acceptable dependency imo

Read more comments on GitHub >

github_iconTop Results From Across the Web

is there a way to fix the following errors after git commit -m?
Looks like you suffered a hard system crash and lost inflight work. The nuclear option is delete those files, reset to the previous...
Read more >
same Change-Id in multiple changes - gerrit-review
This error is quite common, it appears when a user tries to address review comments and creates a new commit instead of amending...
Read more >
git-bisect Documentation - Git
This command uses a binary search algorithm to find which commit in your project's history introduced a bug. You use it by first...
Read more >
IntelliJ IDEA - Commit and push changes to Git repository
When you're ready, click Commit or Commit and Push ( Ctrl+Alt+K ) to push the changes to the remote repository immediately after the...
Read more >
Save your changes with Git commits - Azure Repos
After staging, you save the snapshot by making a commit. This article provides procedures for the following tasks: How Git tracks changes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found