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

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top