[Zope] Why 'unbound method' error?

Warnes, Gregory R gregory_r_warnes@groton.pfizer.com
Thu, 25 Jul 2002 12:18:28 -0400


I've just modified a python product and I've started getting an error that
doesn't make sense to me.

Here's the error message:

Error Type: TypeError
Error Value: unbound method connect() must be called with instance as first
argument
[...]
 File
/Volumes/app/appman/lib/zope/Zope-2.5.1-solaris-2.6-sparc/Products/RSessionD
A/RSessionDA.py, line 213, in putFile
    (Object: RSession)
  File
/Volumes/app/appman/lib/zope/Zope-2.5.1-solaris-2.6-sparc/Products/RSessionD
A/RSOAP/localRSOAPConnection.py, line 124, in uploadFile
    (Object: RSession)
  File
/Volumes/app/appman/lib/zope/Zope-2.5.1-solaris-2.6-sparc/Products/RSessionD
A/RSOAP/localRSOAPConnection.py, line 49, in connect
    (Object: RSession)
TypeError: (see above)

and the 'offending' code:

class RSession(localRSOAPConnection, SimpleItem):
    '''Connection object to the R Kernel'''

     # no connect method defined here ... #
    ....

class localRSOAPConnection(RSOAPConnection):

    def connect(self):
        flag = RSOAPConnection.connect(self)

        if flag:
            self.__checklocal()

        return flag

     ....


The localRSOAPConnection code works just fine in standalone Python.    In
Zope the localRSOAPConnection is extended by RSession with methods that are
Zope-aware.  

My question is why is the call to 'connect' failing in Zope?    I am passing
a valid instance with the self argument...

Ideas appreciated...

-Greg





LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.