[omniORB] BAD_PARAM_WrongPythonType
Arnaud Compan
compan at ipanematech.com
Thu Sep 29 11:29:56 BST 2005
Hi Luke,
I've found my mistake...
I tried to make a little example to reproduce the problem. It took me some
time because this example was working. So I added more and more things until
it finally failed.
My mistake was in the value of an attribute of the Flow structure. This
attribute was:
struct Flow
{
string source;
unsigned long ip_address;
};
and I did
flow.ip_address = socket.inet_aton ('1.2.3.4')
The bug is obvious now because inet_aton() doesn't return an unsigned long.
The right thing to do is:
flow.ip_address = struct.unpack ('>L', socket.inet_aton ('1.2.3.4')) [0]
The Flow structure has about 30 attributes in real life so I didn't see the
problem.
Thanks for your help, regards,
Arnaud.
>-----Message d'origine-----
>De : Luke Deller [mailto:ldeller at xplantechnology.com]
>Envoyé : Thursday, September 29, 2005 6:30 AM
>À : Compan
>Cc : omniorb-list at omniorb-support.com
>Objet : Re: [omniORB] BAD_PARAM_WrongPythonType
>
>
>Hi Arnaud,
>
>I tried to replicate your problem using your IDL and python snippets,
>but it worked fine for me. I was using the same versions of python,
>omniORB and omniORBpy. Could you send us a complete example to
>reproduce your problem?
>
>Have you double-checked that your stubs have been rebuilt with omniidl
>since your last edit to the IDL file?
>
>Regards,
>Luke.
>
>On Wed, 2005-09-28 at 09:10 -0600, Compan wrote:
>> Hi,
>>
>> My python client gets this exception when invoking a request.
>>
>> IDL:
>>
>> struct Flow
>> {
>> string source;
>> };
>>
>> interface CollectorConsumer
>> {
>> oneway void on_test (in Flow f);
>> };
>>
>> python code:
>> flow = new.instance (Flow)
>> flow.source = 'ipe'
>> consumer.on_test (flow)
>>
>> Using -ORBtraceLevel 10, the output is:
>> omniORB: throw BAD_PARAM from pyMarshal.cc:263
>> (NO,BAD_PARAM_WrongPythonType)
>> The exception is thrown by the validateTypeULong() function.
>>
>> I have no idea of how to solve this so any help would be appreciated.
>> I'm using python 2.4.1 and omniORB 4.0.6 (with omniORBpy 2.6)
>>
>> Thanks,
>> Arnaud.
>
>
>*******************************************************************
>***************************
>
>Important Note
>This email (including any attachments) contains information which is
>confidential and may be subject to legal privilege. If you are not
>the intended recipient you must not use, distribute or copy this
>email. If you have received this email in error please notify the
>sender immediately and delete this email. Any views expressed in this
>email are not necessarily the views of XPlan Technology.
>
>It is the duty of the recipient to virus scan and otherwise test the
>information provided before loading onto any computer system.
>Xplan Technology does not warrant that the
>information is free of a virus or any other defect or error.
>*******************************************************************
>***************************
More information about the omniORB-list
mailing list