Skip to content

[codex] Fix Deezer crypto import mismatch#57

Open
gaoyifan wants to merge 1 commit intoCharlesPikachu:masterfrom
gaoyifan:codex/fix-issue-56-cryptodome-import
Open

[codex] Fix Deezer crypto import mismatch#57
gaoyifan wants to merge 1 commit intoCharlesPikachu:masterfrom
gaoyifan:codex/fix-issue-56-cryptodome-import

Conversation

@gaoyifan
Copy link
Copy Markdown

Summary

Root Cause

requirements.txt declares pycryptodome, which exposes the Crypto.* namespace. deezerutils.py imported Cryptodome.* instead, so the CLI crashed during module import before it could honor the user-selected music sources.

Fixes #56.

Validation

  • uvx musicdl --version reproduced the ModuleNotFoundError: No module named 'Cryptodome' failure before the patch
  • uvx --from /Users/yifan/tmp/tmp/repo musicdl --version succeeds after the patch

@gaoyifan gaoyifan marked this pull request as ready for review March 30, 2026 17:22
Copilot AI review requested due to automatic review settings March 30, 2026 17:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a startup-time import crash in the Deezer utility module by aligning its cryptography imports with the project’s declared pycryptodome dependency (Crypto.* namespace), resolving issue #56 where the CLI failed during eager module import.

Changes:

  • Replace Cryptodome.Cipher imports with Crypto.Cipher in deezerutils.py to match pycryptodome.
  • Prevent ModuleNotFoundError: No module named 'Cryptodome' on CLI startup when modules are imported eagerly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 this pull request may close these issues.

[Question]: 在安装后,执行musicdl出现下图中的报错

2 participants