Re: Error Msg: 'NoneType' object is not callable" in <bound method mxODBC_Connection.__del__ of

"M.-A. Lemburg" <[email protected]>
Newsgroups gmane.comp.python.egenix.user
Organization eGenix.com Software GmbH
Message-ID <[email protected]>
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 ?

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

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
               http://www.egenix.com/company/contact/


_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.