Monthly Archives: October 2016

ImportError: cannot import name sanitizer when trying to run django

I hope this saves you a couple hours of headaches that I experienced recently. If you get the dreaded error: from html5lib import sanitizer, serializer, treebuilders, treewalkers ImportError: cannot import name sanitizer Never fear. The fix is easy once you … Continue reading

Posted in django, python, Web Programming | Comments Off on ImportError: cannot import name sanitizer when trying to run django

KeyError: ‘en-us’ when doing a reverse() lookup in urls.py

If you’re getting an error like this: … in reverse_dict return self._reverse_dict[language_code] KeyError: ‘en-us’ If your urls.py file contains a reverse() call, that is the reason.  You’re calling reverse before all the urls are loaded and everything is ready.  You … Continue reading

Posted in django, python, Web Programming | Comments Off on KeyError: ‘en-us’ when doing a reverse() lookup in urls.py