[Soap-Python] rpclib - very strange problem

Burak Arslan burak.arslan at arskom.com.tr
Tue Dec 6 17:53:01 CET 2011


On 12/06/11 18:51, Burak Arslan wrote:
> On 12/06/11 18:46, azurIt wrote:
>> Sorry for bordering, i would write/fix it by myself but i don't fully understand your code. This is what it is doing now:
> you should read about the property built-in.
>
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.5/site-packages/rpclib-2.4.1_beta-py2.5.egg/rpclib/application.py", line 102, in process_request
>>     ctx.out_object = self.call_wrapper(ctx)
>>   File "/usr/lib/python2.5/site-packages/rpclib-2.4.1_beta-py2.5.egg/rpclib/_base.py", line 191, in __setattr__
>>     raise ValueError("use the udc member for storing arbitrary data "
>> ValueError: use the udc member for storing arbitrary data in the method context
> set self.frozen to false in the constructor's last line.

or rather add self.__out_object=None to the ctor.

> i'd forgotten about the __getattr__ in that class, you can modify that
> as well if you understand better what that does.
>
> burak
>>
>> ______________________________________________________________
>>> Od: "Burak Arslan" <burak.arslan at arskom.com.tr>
>>> Komu: azurIt <azurit at pobox.sk>
>>> Dátum: 06.12.2011 17:19
>>> Predmet: Re: [Soap-Python] rpclib - very strange problem
>>>
>>> CC: soap at python.org
>>> On 12/06/11 18:14, azurIt wrote:
>>>> Burak,
>>>>
>>>> can you, please, help me with this a little more? Where exactly should i put that code? Into _base.py file? Thank you!
>>>>
>>>> azur
>>> yes, in the MethodContext class, like so:
>>>
>>> class MethodContext(object):
>>>    def get_out_object(self):
>>>       return self.__out_object
>>>
>>>    def set_out_object(self, what):
>>>       import traceback
>>>       traceback.print_stack()
>>>       self.__out_object = what
>>>
>>>    out_object = property(get_out_object, set_out_object)
>>>
>>>    # (...)
>>>    # rest of the class definition
>>>
>>> hth,
>>> burak
>>>
>>>
>>>
>>>> ______________________________________________________________
>>>>> Od: "Burak Arslan" <burak.arslan at arskom.com.tr>
>>>>> Komu: azurIt <azurit at pobox.sk>
>>>>> Dátum: 05.12.2011 18:33
>>>>> Predmet: Re: [Soap-Python] rpclib - very strange problem
>>>>>
>>>>> CC: soap at python.org
>>>>> On 12/05/11 17:55, azurIt wrote:
>>>>>> Any hints ? :)
>>>>> patch rpclib code to instrument the out_object attribute. have the
>>>>> instrumentation spit tracebacks on assignments. that way you'll be able
>>>>> to track where that strange value comes from.
>>>>>
>>>>> off the top of my head, add these to the MethodContext class:
>>>>>
>>>>> def get_out_object(self):
>>>>>    return self.__out_object
>>>>>
>>>>> def set_out_object(self, what):
>>>>>    import traceback
>>>>>    traceback.print_stack()
>>>>>    self.__out_object = what
>>>>>
>>>>> out_object = property(get_out_object, set_out_object)
>>>>>
>>>>> every _second_ request? heh, that's fun :)
>>>>>
>>>>> good luck,
>>>>> burak
>>>>>
>>>>>
>>>>>> azur
>>>>>> _______________________________________________
>>>>>> Soap mailing list
>>>>>> Soap at python.org
>>>>>> http://mail.python.org/mailman/listinfo/soap
>>>> _______________________________________________
>>>> Soap mailing list
>>>> Soap at python.org
>>>> http://mail.python.org/mailman/listinfo/soap
>> _______________________________________________
>> Soap mailing list
>> Soap at python.org
>> http://mail.python.org/mailman/listinfo/soap
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap



More information about the Soap mailing list