Problem with MySQLdb on Mac OS X...

Michael S. Jessop candiazoo at
Sat Jul 12 05:32:27 CEST 2003

Oh!  Btw... here is the test script...  The username and password has
been changed to protect the innocent!

import MySQLdb

DB = r"xxxxxx"
USER = r"xxxxxx"
PASSWD = r"xxxxxx"

cnn = MySQLdb.connect(db=DB, user=USER, passwd=PASSWD)
cur = cnn.cursor()
cur.execute("select * from art")
rows = cur.fetchmany()

for row in rows:
        print row


In article <110720032317344670%candiazoo at>, Michael S. Jessop
<candiazoo at> wrote:

> I made modifications to to set safe threading to NO and also
> to point to the "real" location of the mysql libraries and stuff like
> that.  To test it I wrote a simple script that just tries to connect to
> the database.  It fails.  It also fails interactively.  Here is what I
> am getting...
> [h000a9578d1ca:~] mike% /usr/local/bin/python2.3
> Traceback (most recent call last):
>   File "", line 7, in ?
>     cnn = MySQLdb.connect(db=DB, user=USER, passwd=PASSWD)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pa
> ckages/MySQLdb/", line 63, in Connect
>     return apply(Connection, args, kwargs)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pa
> ckages/MySQLdb/", line 116, in __init__
>     self.converter[types.StringType] = self.string_literal
> TypeError: object does not support item assignment
> Segmentation fault
> The download, build and install went fine.  This same code works (well,
> different database name, user and password) on a different machine. 
> The database, username and password are all correct.
> Any thoughts?
> Thanks!
> Mike

More information about the Python-list mailing list