Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)
File "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 161, in handler
return ModPythonHandler()(req)
File "/usr/lib/python2.3/site-packages/django/core/handlers/modpython.py", line 137, in __call__
response = middleware_method(request, response)
File "/usr/lib/python2.3/site-packages/django/contrib/sessions/middleware.py", line 81, in process_response
session_key = request.session.session_key or Session.objects.get_new_session_key()
File "/usr/lib/python2.3/site-packages/django/contrib/sessions/models.py", line 21, in get_new_session_key
self.get(session_key=session_key)
File "/usr/lib/python2.3/site-packages/django/db/models/manager.py", line 70, in get
return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line 202, in get
obj_list = list(clone)
File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line 94, in __iter__
return iter(self._get_data())
File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line 412, in _get_data
self._result_cache = list(self.iterator())
File "/usr/lib/python2.3/site-packages/django/db/models/query.py", line 161, in iterator
cursor = connection.cursor()
File "/usr/lib/python2.3/site-packages/django/db/backends/mysql/base.py", line 90, in cursor
self.connection = Database.connect(**kwargs)
File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line 66, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 151, in __init__
self.converter[types.StringType] = string_literal
TypeError: object does not support item assignment
but I canno't understand why.
Have you some suggestions to give ?
ciao ciao
Patrick
--
______________________________________________________
email:pat...@pupazzo.org
http://patrick.pupazzo.org
______________________________________________________
John
Patrick
A brute force way, if nobody else can help, would be to remove classes
one at a time from your model until the admin site works again. Narrow
down and then isolate the problem code, and then stare at it for a real
long time...
John
I have already broken two keyboards trying to risolve the problem :)
Have you another suggestion ?
nope, sorry!...
> File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 151, in __init__
> self.converter[types.StringType] = string_literal
>
> TypeError: object does not support item assignment
I don't really know what the actual cause is, and I've seen this
reported several times, but if you are getting this, something is
probably botched with your MySQLdb installation. I recommend using
version 1.2.1, particularly if you are using MySQL-4.1 or newer (a
must-have for MySQL-5.0 or newer).
If you are manually installing MySQLdb (a.k.a. MySQL-python), be sure
you remove all traces of the 1.2.0 installation before installing
1.2.1; otherwise you will have a mysterious import error involving the
sets module. If you are using some sort of package management system,
this is not likely to be an issue, as it should remove obsolete files
automatically.
This isn't actually a Django issue, so if you still have problems,
follow-up in the help forum over at
http://sourceforge.net/projects/mysql-python
(http://sourceforge.net/forum/forum.php?forum_id=70461). (Don't file a
bug; it's a problem with your installation.)
--
The Pythonic Principle: Python works the way it does
because if it didn't, it wouldn't be Python.