Strange exceptions in MySQLdb

H

Hector Villafuerte

Hi,
I have been using Python 2.3.4 with MySQL 4.0.16-max-nt (through
MySQLdb) for months. Today this messages showed up:

Exception exceptions.AttributeError: "'NoneType' object has no
attribute 'close'" in <bound method Cursor.__del__ of
<MySQLdb.cursors.Cursor instance at 0x0099C148>> ignored
Exception exceptions.AttributeError: "'NoneType' object has no
attribute 'close'" in <bound method Cursor.__del__ of
<MySQLdb.cursors.Cursor instance at 0x009AD080>> ignored
Exception exceptions.AttributeError: "'NoneType' object has no
attribute 'close'" in <bound method Cursor.__del__ of
<MySQLdb.cursors.Cursor instance at 0x009ABF58>> ignored

My scripts work just fine... everything is ok besides this messages
that mean nothing to me :(
Any suggestions? Thanks in advance!
Hector
 
F

Fredrik Lundh

Hector said:
I have been using Python 2.3.4 with MySQL 4.0.16-max-nt (through
MySQLdb) for months. Today this messages showed up:

Exception exceptions.AttributeError: "'NoneType' object has no
attribute 'close'" in <bound method Cursor.__del__ of
<MySQLdb.cursors.Cursor instance at 0x0099C148>> ignored

this means that the Cursor destructor (the __del__ method) attempts to
call some global object during cleanup, but that object has already been
cleaned away.

for some more information on the cleanup procedure, see:

http://www.python.org/doc/essays/cleanup.html

(this should be mentioned in the reference documentation somewhere,
but I only got through to python.org for long enough to dig up that link)

it's most likely a bug in the MySQLdb driver (objects using destructors
*should* keep references to any object needed by the destructor). to
see if it's really harmless, you may want to check the source code: look
for "close" method calls in the Cursor destructor.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,733
Latest member
LonaMonzon

Latest Threads

Top