ryanmcgrath / django-rednoise

An opinionated addon for WhiteNoise, with a focus on Django environments.
Other
18 stars 2 forks source link

Added bytes specifier to "Not Found" strings for Python 3 compatibility. #2

Closed neomanic closed 8 years ago

neomanic commented 8 years ago

My Django project under Python 3 was throwing the error below, which only seems to happen with the hard-coded static links, 'favicon.co' in this instance.

[22/Oct/2015 09:51:16] "GET /static/favicon.ico HTTP/1.1" 404 0
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
    self.write(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/wsgiref/handlers.py", line 266, in write
    "write() argument must be a bytes instance"
AssertionError: write() argument must be a bytes instance
ryanmcgrath commented 8 years ago

This is merged, however I'm not planning to do a release anytime soon - at least not until I handle some other life things first. Definitely thanks for the bugfix though!