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

Pin httpx dependency so spleeter follows redirects for model downloading #949

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

microtherion
Copy link
Contributor

@microtherion microtherion commented Jan 28, 2024

At the moment, spleeter model downloads are failing, at least for me, because:

  • spleeter models when downloaded from github go through a redirection.
  • spleeter-web specifies a httpx dependency of 0.26.0.
  • As of 0.20.0, httpx no longer follows redirects by default.
  • spleeter fails to explicitly request following redirects.

This issue has been called out in an unmerged spleeter PR: deezer/spleeter#808 but that has not been merged for a long time.

One possible solution might be to downgrade the httpx dependency to < 0.20.0, but I don't know what other repercussions this could have. The other solution, which I've chosen here, is to fix the spleeter code with a patch applied at container build time.
After discussion of alternatives with @JeffreyCA, this PR pins httpx at 0.19.0

Copy link
Owner

@JeffreyCA JeffreyCA left a comment

Choose a reason for hiding this comment

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

Thanks for the fix and catching this! This was actually a regression in the recent release and the version of httpx being installed before was 0.19.0. Could we downgrade it instead in requirements.txt?

@microtherion
Copy link
Contributor Author

Sure, I'll try that. I assumed there was a reason for the version bump, so I did not investigate that avenue. But should there be safeguards in place to avoid a repetition of this problem?

@JeffreyCA
Copy link
Owner

There's a dependabot.yml we can add httpx to

@microtherion microtherion changed the title Monkey patch to spleeter so it follows redirects for model downloading Pin httpx dependency so spleeter follows redirects for model downloading Feb 1, 2024
@microtherion
Copy link
Contributor Author

I verified that pinning httpx to 0.19.0 works. I hope the dependabot change is correct — I have no experience with that and would not know how to test it.

@JeffreyCA JeffreyCA merged commit 8457789 into JeffreyCA:master Feb 2, 2024
@JeffreyCA
Copy link
Owner

Perfect, thanks again!

@microtherion microtherion deleted the follow-redirects branch February 3, 2024 00:25
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.

2 participants