odd crash

19 views
Skip to first unread message

Larry Martell

unread,
Jun 8, 2018, 4:17:47 PM6/8/18
to django...@googlegroups.com
I have an app that uses 1.9. It will work fine for weeks and weeks,
and then out of the blue a page that has just worked will crash with
this:

Request Method: GET
Request URL:

Django Version: 1.9
Python Version: 2.7.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'core.data',
'core.alerts',
'core.reports',
'app.cdsem',
'app.semvision',
'app.developer',
'dispatch',
'ui',
'configuration']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'middleware.LastSiteUrl']

Traceback:

File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py"
in get_response
174. response =
self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py"
in get_response
172. response = response.render()
File "/usr/lib/python2.7/site-packages/django/template/response.py" in render
160. self.content = self.rendered_content
File "/usr/lib/python2.7/site-packages/django/template/response.py" in
rendered_content
137. content = template.render(context, self._request)
File "/usr/lib/python2.7/site-packages/django/template/backends/django.py"
in render
95. return self.template.render(context)
File "/usr/lib/python2.7/site-packages/django/template/base.py" in render
204. with context.bind_template(self):
File "/usr/lib64/python2.7/contextlib.py" in __enter__
17. return self.gen.next()

exceptions must be old-style classes or derived from BaseException, not str

Request Method: GET
Request URL:
Django Version: 1.9
Exception Type: TypeError
Exception Value:

exceptions must be old-style classes or derived from BaseException, not str

Exception Location:
/usr/lib/python2.7/site-packages/django/utils/module_loading.py in
import_string, line 23

If I go the exact same URL again it will work.

Anyone have any idea what could be causing this or how I can debug it further?

Larry Martell

unread,
Jun 13, 2018, 10:19:39 AM6/13/18
to django...@googlegroups.com
Update:

The django code clearly has a bug, and I fixed it on my system. That
allowed me to see the next higher up error, which was an error
importing one of my own context_processors. This is odd, as the file
and function are there, and are readable, and if they were not I would
always get this error, not just get it intermittently. I still think
there is another higher up error, and I tried to find it by setting a
breakpoint and running the devel server, but with that the error never
occurs.
Reply all
Reply to author
Forward
0 new messages