Piet van Oostrum
2009-03-03 22:06:37 UTC
I have a problem with a struct parameter in omniORBpy. It looks similar
to a problem that appeared on this list 2 weeks ago ("Caught an
unexpected Python exception during up-call") but the situation is quite
different.
I am using omniORB 4.1.3 and omniORBpy-3.3 on MacOS X 10.4 with Python
version 2.6.
I have the following idl:
------------------------------------------------------------------------
module Test {
struct hist {
long lower;
long higher;
};
interface Try {
void meth (out hist h);
};
};
------------------------------------------------------------------------
The server implementation of the method is:
------------------------------------------------------------------------
def meth():
return hist(1, 10)
------------------------------------------------------------------------
because out parameters are implemented as results.
the client code is:
------------------------------------------------------------------------
print server.meth()
------------------------------------------------------------------------
I get an exception:
------------------------------------------------------------------------
omniORB: Caught an unexpected Python exception during up-call.
TypeError: meth() takes no arguments (1 given)
Traceback (most recent call last):
File "client.py", line 30, in <module>
print server.meth()
File "/Users/piet/colleges/GOB/examples/Corba/TestStructOut/strout_idl.py", line 61, in meth
return _omnipy.invoke(self, "meth", _0_Test.Try._d_meth, args)
omniORB.CORBA.UNKNOWN: CORBA.UNKNOWN(omniORB.UNKNOWN_PythonException, CORBA.COMPLETED_MAYBE)
------------------------------------------------------------------------
Where does this argument come from? It is not in my client code. Also if
I change the method in the IDL to return the struct instead of using an
out parameter it gives the same error.
Am I doing something wrong? Is this a bug? Or is omniorbpy incompatible
with python 2.6?
to a problem that appeared on this list 2 weeks ago ("Caught an
unexpected Python exception during up-call") but the situation is quite
different.
I am using omniORB 4.1.3 and omniORBpy-3.3 on MacOS X 10.4 with Python
version 2.6.
I have the following idl:
------------------------------------------------------------------------
module Test {
struct hist {
long lower;
long higher;
};
interface Try {
void meth (out hist h);
};
};
------------------------------------------------------------------------
The server implementation of the method is:
------------------------------------------------------------------------
def meth():
return hist(1, 10)
------------------------------------------------------------------------
because out parameters are implemented as results.
the client code is:
------------------------------------------------------------------------
print server.meth()
------------------------------------------------------------------------
I get an exception:
------------------------------------------------------------------------
omniORB: Caught an unexpected Python exception during up-call.
TypeError: meth() takes no arguments (1 given)
Traceback (most recent call last):
File "client.py", line 30, in <module>
print server.meth()
File "/Users/piet/colleges/GOB/examples/Corba/TestStructOut/strout_idl.py", line 61, in meth
return _omnipy.invoke(self, "meth", _0_Test.Try._d_meth, args)
omniORB.CORBA.UNKNOWN: CORBA.UNKNOWN(omniORB.UNKNOWN_PythonException, CORBA.COMPLETED_MAYBE)
------------------------------------------------------------------------
Where does this argument come from? It is not in my client code. Also if
I change the method in the IDL to return the struct instead of using an
out parameter it gives the same error.
Am I doing something wrong? Is this a bug? Or is omniorbpy incompatible
with python 2.6?
--
Piet van Oostrum <***@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: ***@vanoostrum.org
Piet van Oostrum <***@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: ***@vanoostrum.org