[Pythonmac-SIG] Re: MySQLdb.connect
andrep at ntlworld.com
Thu Jun 19 03:29:19 EDT 2003
The cause of my problem was out of date header files.
The 4.0.13 MySQL package installer puts everything into:
Check that you don't have conflicting headers from earlier MySQL
installs in, say, /usr/include/mysql
Setup.py checks both directories, but in the wrong order to save the
careless from tripping over their own shoelaces..
> On Thursday, June 19, 2003, at 12:26 am, Andre Posumentov wrote:
>> Just to confirm that I've also stumbled over Nigel's problem:
>> - Using MySQLdb I get:
>> >>> import MySQLdb
>> >>> db = MySQLdb.connect(db='test')
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File "MySQLdb/__init__.py", line 63, in Connect
>> return apply(Connection, args, kwargs)
>> File "MySQLdb/connections.py", line 116, in __init__
>> self.converter[types.StringType] = self.string_literal
>> TypeError: object does not support item assignment
>> *** malloc: Deallocation of a pointer not malloced: 0xf0878;
>> This could be a double free(), or free() called with the middle of an
>> allocated block; Try setting environment variable MallocHelp to see
>> tools to help debug
>> - Using _mysql I get:
>> >>> import _mysql
>> >>> db=_mysql.connect()
>> *** malloc: error for object 0x3cdc18: Incorrect checksum for
>> freed object - object was probably modified after being freed; break
>> at szone_error
>> In both cases, the interpreter then dies, with a seg fault.
>> This, using Python 2.2.1, the MySQL 4.0.13 package install, and
>> Same errors after re-compiling with Python 2.3b1, for what it's worth.
>> More later if I can unearth any useful insights.
>> Andre P
>>> 1. MySQLdb.connect (Nigel King)
>>> From: Nigel King <king at dircon.co.uk>
>>> Date: Wed Jun 18, 2003 12:20:12 pm Europe/London
>>> To: <pythonmac-sig at python.org>
>>> Subject: [Pythonmac-SIG] MySQLdb.connect
>>>> My first guess: you built the Python MySQLdb extension with another
>>>> Python that you're using to run it. You're running with Apple's
>>>> 2.2, maybe built it with Python 2.3a2? or with fink-Python from
>>> I very carefully (ie got my son who is a Unix software Engineer)
>>> under each of the versions and ran the MySQLdb query under each. So
>>> I do not
>>> think this is the problem.
>>> It seems from the lack of interest that nobody else is having the
>>> problem. Please somebody confirm.
More information about the Pythonmac-SIG