[omniORB] exception in generated code
Duncan Grisby
duncan at grisby.org
Sun Jan 6 15:44:45 GMT 2008
On Thursday 3 January, "Morris, Steve (SW/FW - Rehovot)" wrote:
[...]
> File "C:\projects\JobPreview\iPC_Connect_idl.py", line 107, in __init__
> _0_iPC_API._objref_PropertyManager.__init__(self)
> TypeError: unbound method __init__() must be called with _objref_PropertyManager instance as first argument (got _objref_iPC_Connect instance instead)
[...]
> #include <iPC_PropertyManager.idl>
> module iPC_API {
> interface iPC_Connect : PropertyManager
> {
> boolean testIt( );
> };
> };
>
> module iPC_API {
> interface PropertyManager
> {
> boolean get(in boolean property);
> };
> };
Could that interface declaration be included more than once, or is the
interface declared in more than one file? The generated code that's
failing looks like this
class _objref_iPC_Connect (_0_iPC_API._objref_PropertyManager):
_NP_RepositoryId = iPC_Connect._NP_RepositoryId
def __init__(self):
_0_iPC_API._objref_PropertyManager.__init__(self)
So, on the face of it, the class is definitely correctly derived from
the base class whose __init__ method it's trying to call. The only way
it could fail would be if at some point after that class declaration,
_0_iPC_API._objref_PropertyManager was set to be a different class to
the one that was present at the time the _objref_iPC_Connect class was
declared.
First of all, remove all the generated code and regenerate it, in case
you have something left over from a previous version of the IDL. If that
doesn't help, grep all the _idl.py files looking for duplicate
definitions of the _objref_PropertyManager class.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list