Amal Amal - 4 years ago 390
Python Question

Django expat issue

I am new to python and this Error when running django migrate:

from xml.sax.expatreader import ExpatParser as _ExpatParser
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 24, in <module>
raise SAXReaderNotAvailable("expat not supported", None)
xml.sax._exceptions.SAXReaderNotAvailable: expat not supported


Using Django 1.7 on Ubuntu 14.04 and python 2.7. Anybody have idea how to fix this?

Answer Source

Looks like your Python install is broken, cf http://askubuntu.com/questions/161876/puimporterror-no-module-named-pyexpat and /usr/lib/python2.7/xml/sax/expatreader.py. The statement that raises is line 22 : "from xml.parsers import expat", and xml.parsers.expat just imports everything from the C pyexpat module at /usr/lib/python2.7/lib-dynload/pyexpat.so.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download