[Fixed]-Strange UnicodeDecodeError on django

32👍

Looks like you tried to hit http website with https

👤Arpit

4👍

Were you trying this with https?

I had the same problem and finally figured out it should be with http (no s) while in development. https encrypts your request, which is a bunch of gibberish as far as the development server is concerned.

3👍

From the stack trace it looks Django development server tries to log a request and fails because request is invalid.

Turns out that BaseHTTPServer simply logs the first line of raw HTTP request, so if your browser sends trash in request (who knows why) then development server might fail trying to log it. I would suggest using a development console or Firebug to check the request headers sent by browser. If this is the case, then whole situation is more of a test environment issue.

👤Marat

Leave a comment