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
Python3 compatibility issue in get_content_type() #636
Comments
submitted PR which fixes the issue |
I am not sure whether this is Werkzeug's fault or Django uses wrong string types in its responses. |
Here is full traceback in ipdb and I dont see Django being called anywhere. Complete stackstace seems to be only in werkzeug.
|
The problem seems to be in 2 frames above:
|
Whats strange is that
Should I adjust PR to convert mimetype here instead of in |
Your PR does fix the problem, but this should never have happened, as you said. What is filename in the frame where the |
its string. I though that maybe |
Hi, this happens often when using the |
Recently I got the same problem, for me it happens on javascript files. After debugging I found my problem was django-pipeline: it modifies the Maybe you should reconsider merging the PR. Hope this helps someone... happy debugging! |
Django-Pipelines should be fixed so that it does not put bytes into the mimetype type map. Django-Extensions doesn't appear to be doing anything, but that just means some other dependency is misbehaving. I'm closing this as I think it should be addressed in the libraries adding the bad data. If someone can post a good reason that bytes should be expected in the mimetypes type map, I'll reconsider. |
I use Django with
django_extensions
which uses werkzeug for debugging when usingrunserver_plus
. Werkzeug seems to blow up inget_content_type()
with following traceback when using Python3:The text was updated successfully, but these errors were encountered: