15:46 Thursday, 11 May 2006
Django technical_500_response error
I recently switched from the Django magic-removal branch to the trunk post-magic-removal. I was getting this bizarre error:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/sw/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)
File "/Users/simonb/src/dj/trunk/django/core/handlers/modpython.py", line 157, in handler
return ModPythonHandler()(req)
File "/Users/simonb/src/dj/trunk/django/core/handlers/modpython.py", line 129, in __call__
response = self.get_response(req.uri, request)
File "/Users/simonb/src/dj/magic-removal/django/core/handlers/base.py", line 100, in get_response
File "/Users/simonb/src/dj/magic-removal/django/core/handlers/base.py", line 133, in get_technical_error_response
File "/Users/simonb/src/dj/trunk/django/views/debug.py", line 115, in technical_500_response
c = Context({
IndexError: list index out of range
Well, it took me a while to figure out. Notice that the directory name used for the Django distribution changes in the traceback - from “trunk” to “magic-removal”. After I had updated I had changed the directory name from magic-removal to trunk. Ah ha! So a quick “find -name ‘*.pyc’ -exec rm {} \;” got rid of the compiled code with the old paths names. Now, at least, the errors make sense.
Tags:
djangoAbout
I'm the chief geek of yaean design based in Shanghai.
Tags
- 3D
- ajax
- art
- audio
- bbc
- books
- browsers
- business
- cars
- china
- chinglish
- christmas
- cms
- crowdsourcing
- design
- django
- education
- food
- football
- games
- generators
- gentoo
- guitars
- health
- history
- hongkong
- html5
- humans
- humour
- inspiration
- internet
- iphone
- javascript
- kids
- lego
- life
- linux
- mac
- magazines
- maps
- maths
- media
- mobile
- movies
- music
- mysql
- nasa
- nature
- news
- p4p
- parenthood
- photography
- physics
- poetry
- postgresql
- privacy
- programming
- python
- radio
- research
- restaurants
- robots
- ruby
- security
- shanghai
- solar
- space
- standards
- stories
- superpowers
- tagclouds
- taste
- tech
- travel
- type
- ui
- uk
- ux
- video
- visualisation
- web
- windows
- word
- writing
- yajogo