id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 12594,Meaningless exception when DEBUG=False and resolver.urlconf_module is None.,Yuri Baburov,Yuri Baburov,"Because of resolver.resolve500() can now fail due to urlconf_module set to None in django/core/handlers/base.py, sometimes site developer doesn't get appropriate error message. Instead developer gets message that handler500 is not found in urlconf module. Problem is only in handler500 lookup, everything else goes well. How to reproduce: set DEBUG to False, comment out ROOT_URLCONF line. I managed to find this problem it another way, but it will take some time to figure out how settings.py can be imported without errors, but get empty dir to LazySettings. My suggested fix: {{{ #!python def handle_uncaught_exception(self, request, resolver, exc_info): ... mail_admins(subject, message, fail_silently=True) # Return an HttpResponse that displays a friendly error message. if resolver.urlconf_module is None: # FIX LINE1: you aren't getting http500! raise exc_info[1], None, exc_info[2] # FIX LINE2: so we'll raise it raw. callback, param_dict = resolver.resolve500() return callback(request, **param_dict) }}}",,closed,HTTP handling,1.2-alpha,,fixed,,,Accepted,1,0,0,0,0,0