Monday, November 29, 2010

MySQLdb InterfaceError

I'm so frustrated with this problem I am about to lose it. I've tried
multiple versions of python, mysql, mysql-python, django, etc. I've
resorted to a clean installation of CentOS 5, fully up to date, with
all packages installed by the book. Currently I'm using DJango 1.2.3
and MySQL-python 1.2.3, both built on this system from clean source.
I've tried both mod_wsgi and mod_python methods. Currently I'm using
mod_python. Ignore the Request URL, please. This is a new system and
not the live site. I'm using internal host entries. Why am I getting
this InterfaceError? The only reference that I can find is a problem
in MySQL 5.0, but this isn't relevant to our situation:
http://bugs.mysql.com/bug.php?id=21543. I'm pulling my hair out. Any
help or guidance would be appreciated.

Request Method: GET
Request URL: http://nydn.findingdulcinea.com/nydailynews/news/on-this-day/November/Harvey-Milk-Murdered
Django Version: 1.2.3
Exception Type: InterfaceError
Exception Value: (0, '')
Exception Location: build/bdist.linux-x86_64/egg/MySQLdb/
connections.py in set_character_set, line 294
Python Executable: /usr/bin/python
Python Version: 2.4.3
Python Path: ['/app/django_fD', '/app/', '/usr/lib64/python2.4/site-
packages/MySQL_python-1.2.3-py2.4-linux-x86_64.egg', '/usr/lib64/
python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-
linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-
dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/
site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages']
Server time: Mon, 29 Nov 2010 13:37:44 -0500

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/django/core/handlers/
base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/python2.4/site-packages/django/utils/decorators.py",
line 76, in _wrapped_view
response = view_func(request, *args, **kwargs)

File "/app/django_fD/../django_fD/nydailynews/views.py", line 28, in
get_HB1
return render_today_article1()

File "/app/django_fD/../django_fD/nydailynews/views.py", line 296,
in render_today_article1
article = get_today_article(type)

File "/app/django_fD/../django_fD/nydailynews/views.py", line 267,
in get_today_article
row = __get_otd_article_row(cnt, type)

File "/app/django_fD/../django_fD/nydailynews/views.py", line 302,
in __get_otd_article_row
cursor = connection.cursor()

File "/usr/lib/python2.4/site-packages/django/db/backends/
__init__.py", line 75, in cursor
cursor = self._cursor()

File "/usr/lib/python2.4/site-packages/django/db/backends/mysql/
base.py", line 297, in _cursor
self.connection = Database.connect(**kwargs)

File "build/bdist.linux-x86_64/egg/MySQLdb/__init__.py", line 81, in
Connect

File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line
215, in __init__

File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line
294, in set_character_set

InterfaceError: (0, '')


<ModPythonRequest
path:/nydailynews/happybirthday1/,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'__utma':
'81870849.504635047.1291000318.1291000318.1291000318.1',
'__utmb': '81870849.1.10.1291000318',
'__utmc': '81870849',
'__utmz': '81870849.1291000318.1.1.utmcsr=bing|utmccn=(organic)|
utmcmd=organic|utmctr=human%20anatomy%20for%20kids'},
META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0,
'CONTENT_TYPE': None,
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/x-ms-application, image/jpeg, application/
xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/
vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
application/x-shockwave-flash, */*',
'HTTP_ACCEPT_LANGUAGE': 'en-US',
'HTTP_CONNECTION': 'Close',
'HTTP_COOKIE':
'__utma=81870849.504635047.1291000318.1291000318.1291000318.1;
__utmb=81870849.1.10.1291000318; __utmc=81870849;
__utmz=81870849.1291000318.1.1.utmcsr=bing|utmccn=(organic)|
utmcmd=organic|utmctr=human%20anatomy%20for%20kids',
'HTTP_HOST': 'nydn.findingdulcinea.com',
'HTTP_REFERER': 'http://www.findingdulcinea.com/guides/Science/Human-
Anatomy.pg_00.html',
'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT
6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR
3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0;
HPNTDF; .NET4.0C)',
'HTTP_X_FORWARDED_FOR': '67.143.191.85',
'PATH_INFO': u'/nydailynews/happybirthday1/',
'PATH_TRANSLATED': None,
'QUERY_STRING': None,
'REMOTE_ADDR': '67.142.171.22',
'REMOTE_HOST': None,
'REMOTE_IDENT': None,
'REMOTE_USER': None,
'REQUEST_METHOD': 'GET',
'SCRIPT_NAME': '',
'SERVER_NAME': 'nydn.findingdulcinea.com',
'SERVER_PORT': 80,
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'mod_python'}>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment