2👍
✅
If you look at the revision logs of that file you’ll see that django has recently started catching the KeyError that is raised in that try block.
The log message reads “Ensured generating debug 404 page won’t raise a key error. Thanks pigletto.”
See the ticket http://code.djangoproject.com/ticket/12083 and the changeset http://code.djangoproject.com/changeset/12679
So, I would check if you’re raising a debug 404 page, or if any of the other comments in the ticket jump out of you.
Hope that helps!
Update: After looking at the code a little bit closer, I’d take a good look at your urls.py file for any mistakes in the url resolving regex. Are you doing url(”) instead of (‘^$’) for the root/homepage?
Source:stackexchange.com