admin connection mysql problem

2 views
Skip to first unread message

Patrick

unread,
Jun 26, 2006, 7:31:32 AM6/26/06
to django...@googlegroups.com
Hi,
when i go in my admin site (http://basetta.pupazzo.org/admin)
I recieve always this

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 DeRosa

unread,
Jun 26, 2006, 11:41:45 AM6/26/06
to django...@googlegroups.com
When I've seen messages similar to this, it's usually because an
identifier in the meta.Admin list_display list was not defined as a
field in the class. A good place to start would be to check the
spelling of every field listed in meta.Admin.

John

Patrick

unread,
Jun 27, 2006, 2:21:30 AM6/27/06
to django...@googlegroups.com
Thx john i have checked the spelling of every field listed in Admin
class but the error was always there.

Patrick

Patrick Martini

unread,
Jun 27, 2006, 3:46:39 AM6/27/06
to django...@googlegroups.com
Now i have tried only the default admin page without any app and the
results are the same

John DeRosa

unread,
Jun 27, 2006, 1:16:56 PM6/27/06
to django...@googlegroups.com
Oh well, sorry my suggestion didn't help.

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

Patrick Martini

unread,
Jun 27, 2006, 1:38:10 PM6/27/06
to django...@googlegroups.com
Thanks for the answer :)
I have tries to start my site without installed application.
But the admin give me always the same problem.

I have already broken two keyboards trying to risolve the problem :)

Have you another suggestion ?

John DeRosa

unread,
Jun 27, 2006, 2:00:21 PM6/27/06
to django...@googlegroups.com
Patrick Martini wrote:
> Thanks for the answer :)
> I have tries to start my site without installed application.
> But the admin give me always the same problem.
>
> I have already broken two keyboards trying to risolve the problem :)
>
> Have you another suggestion ?

nope, sorry!...

Andy Dustman

unread,
Jun 27, 2006, 2:59:43 PM6/27/06
to django...@googlegroups.com
On 6/26/06, Patrick <pat...@pupazzo.org> wrote:

> 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.

Reply all
Reply to author
Forward
0 new messages