Skip to content

NameError: name 'unicode' is not defined #85

@ghost

Description

I am using Django 1.8.2 on Python 3.4.2.
I have added the appropriate middleware classes and set HTML_MINIFY = True in order to test it while having DEBUG on.

When I run my development server, I get a "NameError" type of error, with the message "name 'unicode' is not defined".

Exception Value:    
name 'unicode' is not defined
Exception Location: /Users/drcooldude/Desktop/testproject/env/lib/python3.4/site-packages/htmlmin/minify.py in html_minify, line 43
Python Executable:  /Users/drcooldude/Desktop/testproject/env/bin/python

Traceback:
File "/Users/drcooldude/Desktop/testproject/env/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  223.                 response = middleware_method(request, response)
File "/Users/drcooldude/Desktop/testproject/env/lib/python3.4/site-packages/htmlmin/middleware.py" in process_response
  44.                                            parser=parser)
File "/Users/drcooldude/Desktop/testproject/env/lib/python3.4/site-packages/htmlmin/minify.py" in html_minify
  43.     return unicode(mini_soup)

According to my traceback, the error is located in minify.py at line 43.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions