Wednesday, November 16, 2011

Another strange Django error

If you stumble across the error in Django 1.3:

  File "/Users/brad/work/django-formwizard/.env/lib/python2.7/site-packages/django/core/", line 368, in reverse
    app_list = resolver.app_dict[ns]
  File "/Users/brad/work/django-formwizard/.env/lib/python2.7/site-packages/django/core/", line 241, in _get_app_dict
  File "/Users/brad/work/django-formwizard/.env/lib/python2.7/site-packages/django/core/", line 198, in _populate
    p_pattern = pattern.regex.pattern
AttributeError: 'str' object has no attribute 'regex'

Or in Django 1.4:


  File "/brew/Cellar/python/2.7.1/lib/python2.7/site-packages/django/core/handlers/", line 101, in get_response
  File "/brew/Cellar/python/2.7.1/lib/python2.7/site-packages/django/core/", line 300, in resolve
    sub_match = pattern.resolve(new_path)
AttributeError: 'str' object has no attribute 'resolve'

You have probably accidentally left a trailing comma in the URLCONF_ROOT setting, i.e.:

ROOT_URLCONF = 'project.urls',

No comments:

Post a Comment