-
Notifications
You must be signed in to change notification settings - Fork 559
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
panic: dataurl: invalid mediatype #2032
Comments
Here's a minimal predict.py I used for testing. Combine it with the cog.yaml from
|
I tried to figure out where this is going wrong. Results:
This suggests that there's some kind of file or dependency missing from the cog binary. |
Cog doesn't account for the case that One of the fixes is easy: account for the case that |
This commit updates the import for the `mime` package to use the local utility which handles the case where `mime.TypeByExtension` returns an empty string. Fixes #2032
Thanks for reporting this. We already had the code in the code-base to handle this case, it just wasn't being used. I've opened #2044 to fix it. |
I'm trying to run a replicate image locally with cog 0.11.6:
which runs into an error "panic: dataurl: invalid mediatype":
I get the same results with .wav and .mkv files, and I've also tried other mp3 files to make sure it was not a bad audio file or ffmpeg conversion mistake. I've attached a zipped mp3 file for reproducing the issue.
To reproduce:
I'm also pretty sure the error is due to cog and not the underlying Python code. If I pull the image, do
cog run bash
and run the Python code manually from inside the docker container, everything works fine.Also note this is different from #1264.
The text was updated successfully, but these errors were encountered: