AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

2,089 views
Skip to first unread message

Pratik Mandrekar

unread,
Jul 2, 2013, 7:14:00 AM7/2/13
to django...@googlegroups.com
Hello,


I keep getting the error AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module' and the only trace available is as shown below:

'RegexURLResolver' object has no attribute '_urlconf_module'

My Sentry Error reporting normally shows the above error along with another error, both of which seem to happen simultaneously


django.core.urlresolvers in urlconf_module

AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'


The trace for which is


  1.  @property
    
  2.     def urlconf_module(self):
    
  3.         try:
    
  4.             return self._urlconf_module
    
  5.         except AttributeError:
    
  6.             self._urlconf_module = import_module(self.urlconf_name)
    
  7.             return self._urlconf_module
    
  8.     @property
    

'self'
<RegexURLResolver urls (None:None) ^/>

I'm on Django 1.4. I have been unable to debug this for weeks. Any help would be appreciated. 


Thanks,

Pratik

Tom Evans

unread,
Jul 2, 2013, 7:23:09 AM7/2/13
to django...@googlegroups.com
Sounds like your ROOT_URLCONF is incorrectly specified in settings.

Cheers

Tom

Pratik Mandrekar

unread,
Jul 2, 2013, 9:56:08 AM7/2/13
to django...@googlegroups.com, teva...@googlemail.com
Hey Tom,

My ROOT_URLCONF points to 'urls' which is the top level urlconf for my site. Besides all my urls do work. This error keeps coming intermittently but does not affect my application logic in any way I know. So I need to know why this error keeps getting reported and how to fix it.

Thanks,
Pratik

burak.k...@gmail.com

unread,
Nov 20, 2013, 11:00:42 AM11/20/13
to django...@googlegroups.com, teva...@googlemail.com
Hello,

Is there an answer to this problem?

KwangYoun Jung

unread,
Nov 23, 2015, 7:07:29 AM11/23/15
to Django users
Did you solve the issue?

knbk

unread,
Nov 23, 2015, 7:31:01 AM11/23/15
to Django users
Python 3 displays the original exception alongside the new exception when a new exception occurs in an except block. The AttributeError is expected, so this doesn't tell you anything about what goes wrong. The second error occurs when importing `self.urlconf_name`. The traceback should point you to the exact cause of this second error, that's the error you will have to solve to resolve this issue. 
Reply all
Reply to author
Forward
0 new messages