[egenix-users] Error Msg: 'NoneType' object is not callable" in <bound method mxODBC_Connection.__del__ of

M.-A. Lemburg mal at egenix.com
Mon Feb 9 15:53:40 CET 2009

On 2009-02-09 12:13, Senthil Kumaran wrote:
> Hello,
> I am using mxODBC Connect from a Linux client to a Windows Server and
> my application uses Storm backend.
> While I am able to establish the connection and get the operation
> done, after the completion of the operation I get this error message:
> Exception exceptions.TypeError: "'NoneType' object is not callable" in
> <bound method mxODBC_Connection.__del__ of <mxODBC_Connection
> id:14560496 meta_info:<MetaInfo class_name:None module_name:None
> name:None type_name:'mxODBC Connection'>>> ignored
> Can someone help me understand the meaning of this error with respect
> to mxODBC_Connection class?
> Here's my setup:
> I am doing:
> from mx.ODBCConnect.Client import ServerSession
> session = ServerSession(self.config_path)
> mssqldbapi = session.open()
> And I have mssqldabapi as a global object so that I can import it in a
> different module.
> As I am NOT doing a .close() on mssqldbapi,  is there any chance of
> this error coming up?
> Documentation says that session object is automatically closed when
> garbage collected and I am see that in stand-alone snippets.
> But in the scenario, I have described above I am not really sure as
> why this error message surfaces and the meaning of this error message.

Given that the above error is triggered in the .__del__()
method, it is generated during garbage collection of the connection
object and there's obviously an attempt being made at calling
an object which was already garbage collected.

Are you using multiple threads or a single threaded process and
sharing the session object between those ?

Do you see any other messages related to this in the client or
server log files ?

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Feb 09 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the egenix-users mailing list