Opened 10 years ago

Closed 10 years ago

#22953 closed Bug (worksforme)

ImportError: cannot import name html_entities

Reported by: omcdr7@… Owned by: nobody
Component: HTTP handling Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Tested by Python 3.3 and Django 1.6.5

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Program Files (x86)\Python33\lib\site-packages\django\core\management
\__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "C:\Program Files (x86)\Python33\lib\site-packages\django\core\management
\__init__.py", line 392, in execute
 
    from django.utils.html import format_html, format_html_join
  File "C:\Program Files (x86)\Python33\lib\site-packages\django\utils\html.py", line 12, in <module>
    from django.utils.text import normalize_newlines
  File "C:\Program Files (x86)\Python33\lib\site-packages\django\utils\text.py", line 11, in <module>
    from django.utils.six.moves import html_entities
ImportError: cannot import name html_entities




    from .html_parser import HTMLParser, HTMLParseError
  File "C:\Program Files (x86)\Python33\lib\site-packages\django\utils\html_parser.py", line 1, in <module>
    from django.utils.six.moves import html_parser as _html_parser
ImportError: cannot import name html_parser

Change History (2)

comment:1 by Claude Paroz, 10 years ago

Can you check that you have no html.py or html directory in your project that Python would use to override the standard html.* package from Python 3?

comment:2 by Tim Graham, 10 years ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top