#13684: Django bug masks real errors: local variable 'resolver' referenced 
before
assignment
---------------------------+------------------------------------------------
 Reporter:  akaihola       |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  HTTP handling  |     Version:  SVN       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  1              |  
---------------------------+------------------------------------------------
 I ran into this when my custom settings for running unit tests didn't
 include `ROOT_URLCONF`, and others have seen this too
 ([http://groups.google.com/group/django-non-
 relational/browse_thread/thread/0b21bd386dd9da21 1],
 
[http://webcache.googleusercontent.com/search?q=cache:BMZN8wgQHx0J:stackoverflow.com/questions/2892878
 /django-mod-wsgi-error-unboundlocalerror-local-variable-resolver-
 referenced-be+django+"local+variable+'resolver'"&cd=3&hl=fi&ct=clnk&gl=fi
 2],
 [http://www.developerit.com/2010/05/23/django-mod_wsgi-error-
 unboundlocalerror-local-variable-resolver-referenced-before-assignment
 3]).

 In `django.core.handlers.base.get_response`, the `resolver` variable is
 defined inside a `try:` block and referenced in the final catch-all
 `except:` block. I'd move setting up the default url resolver outside the
 `try..except` block since a problem there probably prevents rendering 500
 pages.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13684>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to