I'm getting a ValueError: object of type 'NoneType' has no len() when enabling minification and running a view which is decorated with django.views.decorators.gzip.gzip_page.
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 131, in get_response
response = middleware_method(request, response)
File "/usr/local/lib/python3.4/dist-packages/htmlmin/middleware.py", line 44, in process_response
parser=parser)
File "/usr/local/lib/python3.4/dist-packages/htmlmin/minify.py", line 45, in html_minify
soup = bs4.BeautifulSoup(html_code, parser)
File "/usr/local/lib/python3.4/dist-packages/bs4/__init__.py", line 192, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len()
I'm getting a
ValueError: object of type 'NoneType' has no len()
when enabling minification and running a view which is decorated withdjango.views.decorators.gzip.gzip_page
.