FAQ
I made modifications to setup.py 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 foo.py
Traceback (most recent call last):
File "foo.py", line 7, in ?
cnn = MySQLdb.connect(dbÛ, user=USER, passwd=PASSWD)
File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pa
ckages/MySQLdb/__init__.py", line 63, in Connect
return apply(Connection, args, kwargs)
File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pa
ckages/MySQLdb/connections.py", 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

Search Discussions

  • Michael S. Jessop at Jul 12, 2003 at 3:32 am
    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Û, user=USER, passwd=PASSWD)
    cur = cnn.cursor()
    cur.execute("select * from art")
    rows = cur.fetchmany()

    for row in rows:
    print row

    cur.close()
    cnn.close()

    In article <110720032317344670%candiazoo at mac.com>, Michael S. Jessop
    wrote:
    I made modifications to setup.py 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 foo.py
    Traceback (most recent call last):
    File "foo.py", line 7, in ?
    cnn = MySQLdb.connect(dbÛ, user=USER, passwd=PASSWD)
    File
    "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pa
    ckages/MySQLdb/__init__.py", line 63, in Connect
    return apply(Connection, args, kwargs)
    File
    "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pa
    ckages/MySQLdb/connections.py", 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
  • Skip Montanaro at Jul 12, 2003 at 3:37 pm
    Mike> I made modifications to setup.py to set safe threading to NO and
    Mike> also to point to the "real" location of the mysql libraries and
    Mike> stuff like that. To test it I wrote a simple script that just
    Mike> tries to connect to the database. It fails. It also fails
    Mike> interactively. Here is what I am getting...

    Your script worked fine for me (Mac OS X 10.2.6, Python 2.3b1+), though I
    didn't modify setup.py (at least not that I recall - it's been awhile).

    Mike> The download, build and install went fine. This same code works
    Mike> (well, different database name, user and password) on a different
    Mike> machine. The database, username and password are all correct.

    The only change I made was that the database is remote, so I set the host as
    well.

    Skip
  • Michael S. Jessop at Jul 13, 2003 at 3:21 am
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    I tried supplying host as well, same error. :/ Something is hosed.
    I guess I could try reinstalling. I really want to get this to work.
    I am trying to write a maintenance program for my wife, so she can
    remotely modify the database containing information about her artwork,
    distribution lists, etc.

    Mike J.

    In article <mailman.1058024298.17294.python-list at python.org>, Skip
    Montanaro wrote:
    Mike> I made modifications to setup.py to set safe threading to NO and
    Mike> also to point to the "real" location of the mysql libraries and
    Mike> stuff like that. To test it I wrote a simple script that just
    Mike> tries to connect to the database. It fails. It also fails
    Mike> interactively. Here is what I am getting...

    Your script worked fine for me (Mac OS X 10.2.6, Python 2.3b1+), though I
    didn't modify setup.py (at least not that I recall - it's been awhile).

    Mike> The download, build and install went fine. This same code works
    Mike> (well, different database name, user and password) on a different
    Mike> machine. The database, username and password are all correct.

    The only change I made was that the database is remote, so I set the host as
    well.

    Skip
  • Peter Wilkinson at Jul 14, 2003 at 5:02 pm
    "Michael S. Jessop" <candiazoo at mac.com> wrote in message news:[[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    I tried supplying host as well, same error. :/ Something is hosed.
    I guess I could try reinstalling. I really want to get this to work.
    I am trying to write a maintenance program for my wife, so she can
    remotely modify the database containing information about her artwork,
    distribution lists, etc.
    I see exactly the same problem. My install is with MySQL and Python
    both via Fink. Trying both 2.2 and 2.3 Python I get the same problem.

    Trying to dig into it a little it looks as though the setup code isn't
    populating some of the fields and methods and the error thrown shows
    up because self.converter is set to None.

    I'm going to try and figure this out but would be interested in any
    insight others might have.

    Peter.
  • Michael S. Jessop at Jul 16, 2003 at 5:09 am
    YES! It works. I could kiss you, Peter!

    Thanks!

    Mike J.


    In article <3344b1fa.0307140315.321bb6b2 at posting.google.com>, Peter
    Wilkinson wrote:
    "Michael S. Jessop" <candiazoo at mac.com> wrote in message
    news:<120720032321075007%candiazoo at mac.com>...
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    I tried supplying host as well, same error. :/ Something is hosed.
    I guess I could try reinstalling. I really want to get this to work.
    I am trying to write a maintenance program for my wife, so she can
    remotely modify the database containing information about her artwork,
    distribution lists, etc.
    I see exactly the same problem. My install is with MySQL and Python
    both via Fink. Trying both 2.2 and 2.3 Python I get the same problem.

    Trying to dig into it a little it looks as though the setup code isn't
    populating some of the fields and methods and the error thrown shows
    up because self.converter is set to None.

    I'm going to try and figure this out but would be interested in any
    insight others might have.

    Peter.
  • Peter Wilkinson at Jul 14, 2003 at 5:06 pm
    "Michael S. Jessop" <candiazoo at mac.com> wrote in message news:[[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    I tried supplying host as well, same error. :/ Something is hosed.
    I guess I could try reinstalling. I really want to get this to work.
    I am trying to write a maintenance program for my wife, so she can
    remotely modify the database containing information about her artwork,
    distribution lists, etc.
    I've just sorted out the problem on my machine and it appeared to be a
    set of include files from a previous install of MySQL that were
    sitting in /usr/include, once I removed that and rebuilt with setup.py
    pointing to the Fink include paths it works fine.

    Peter.
  • Michael S. Jessop at Jul 16, 2003 at 4:41 am
    I shall check it out! Thanks.

    Mike J.

    In article <3344b1fa.0307140325.67be7b8c at posting.google.com>, Peter
    Wilkinson wrote:
    "Michael S. Jessop" <candiazoo at mac.com> wrote in message
    news:<120720032321075007%candiazoo at mac.com>...
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    I tried supplying host as well, same error. :/ Something is hosed.
    I guess I could try reinstalling. I really want to get this to work.
    I am trying to write a maintenance program for my wife, so she can
    remotely modify the database containing information about her artwork,
    distribution lists, etc.
    I've just sorted out the problem on my machine and it appeared to be a
    set of include files from a previous install of MySQL that were
    sitting in /usr/include, once I removed that and rebuilt with setup.py
    pointing to the Fink include paths it works fine.

    Peter.
  • Michael S. Jessop at Jul 16, 2003 at 4:46 am
    Oh CRIPES! I have 3 different sets of header files for MySQL!!! Now
    the problem becomes: which do I select? /usr/includes/mysql is out...

    I have a set under /Library/MySQL/include and a set under ... oh
    wait... those are in an application package - so nevermind. I guess I
    just answered my own question! Thanks Peter...

    Mike

    In article <3344b1fa.0307140325.67be7b8c at posting.google.com>, Peter
    Wilkinson wrote:
    "Michael S. Jessop" <candiazoo at mac.com> wrote in message
    news:<120720032321075007%candiazoo at mac.com>...
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    I tried supplying host as well, same error. :/ Something is hosed.
    I guess I could try reinstalling. I really want to get this to work.
    I am trying to write a maintenance program for my wife, so she can
    remotely modify the database containing information about her artwork,
    distribution lists, etc.
    I've just sorted out the problem on my machine and it appeared to be a
    set of include files from a previous install of MySQL that were
    sitting in /usr/include, once I removed that and rebuilt with setup.py
    pointing to the Fink include paths it works fine.

    Peter.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 12, '03 at 3:17a
activeJul 16, '03 at 5:09a
posts9
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase