home / django_tickets / tickets

tickets: 6537

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
6537 2008-02-02 18:06:48 2008-09-04 15:02:11 2022-03-06 03:37:23.663744 Accepted closed Core (Other)     dev duplicate Unhelpful error message: 'tuple index out of range' There's something evidently wrong with my urls.py, but this error message is absolutely no help in sorting it out. Please have it output ''which tuple'' it's trying to index. The error message is providing no context, and unlike normal python tracebacks it is not tied to a particular line in my urls.py. {{{ Traceback (most recent call last): File "c:\django\django\core\servers\basehttp.py", line 277, in run self.result = application(self.environ, self.start_response) File "c:\django\django\core\servers\basehttp.py", line 631, in __call__ return self.application(environ, start_response) File "c:\django\django\core\handlers\wsgi.py", line 205, in __call__ response = self.get_response(request) File "c:\django\django\core\handlers\base.py", line 130, in get_response callback, param_dict = resolver.resolve500() File "c:\django\django\core\urlresolvers.py", line 275, in resolve500 return self._resolve_special('500') File "c:\django\django\core\urlresolvers.py", line 264, in _resolve_special callback = getattr(self.urlconf_module, 'handler%s' % view_type) File "c:\django\django\core\urlresolvers.py", line 255, in _get_urlconf_module raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e) ImproperlyConfigured: Error while importing URLconf 'reports.urls': tuple index out of range }}} Here's the urls.py that is evidently not acceptable, but I cannot see which tuple of tuples of tuples it is trying to index and failing on: {{{ from django.conf.urls.defaults import * import views as views import settings urlpatterns = patterns('', # Example: # (r'^reports/', include('reports.foo.urls')), (r'^$', views.home_page), ) if settings.DEBUG: urlpatterns += patterns('', (r'^images/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'c:/projects/djcode/reports/images'}), (r'^css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'c:/projects/djcode/reports/css'}), ) }}} {{{ nobody Michael@Hipp.com url error message tuple index   1 0 0 0  
Powered by Datasette · Queries took 3.426ms