[spyne] interactiveRejected exception on upgrade

Jernej Makovsek jernej at myprofitsee.com
Tue Sep 16 11:48:45 UTC 2014


Found the problem. It was in one of our func definitions:
@rpc(String(pattern=UUID_PATTERN), String(len_min=1), _returns=String)
interactiveRejected(ticket, reason)

for some reason it worked in the previous version but now it apparently
requires the following definition:
interactiveRejected(ctx, ticket, reason)

Glad we could solve this one so quickly :).

Regards,
Jernej

On Tue, Sep 16, 2014 at 1:35 PM, Jernej Makovsek <jernej at myprofitsee.com>
wrote:

> Hi,
>
> after upgrading to the latest spyne version the following exception is
> thrown:
> Traceback (most recent call last):
> class PrivateServices(ServiceBase):
> File ".../virtenv/lib/python2.7/site-packages/spyne/service.py", line 47,
> in __init__
> descriptor = v(_default_function_name=k)
> File ".../virtenv/lib/python2.7/site-packages/spyne/decorator.py", line
> 296, in explain_method
> _in_message_name, _in_variable_names, _no_ctx, _no_self, _args)
> File ".../virtenv/lib/python2.7/site-packages/spyne/decorator.py", line
> 71, in _produce_input_message
>  "has %d." % (f.__name__, len(args), len(params)))
> Exception: 'interactiveRejected' function has 1 argument(s) but its
> decorator has 2.
>
> The problem from my side is that I can't find anything about
> interactiveRejected in the docs and it seems to be a bug in the library.
> From what I read in
> http://spyne.io/docs/2.11/migration.html?highlight=decorator the problem
> could be strict checking in the new version. I checked my definitions and
> there are of the form:
>  @rpc(String(pattern=UUID_PATTERN), String, String, String,
> _returns=Integer)
>     def foo(ctx, ticket, response, hresult, message):
>           bar
>
> which satisfies the strict checking.
>
> Any help appreciated!
> --
> Jernej Makovsek,
> developer at MyProfitSee
>



-- 
Jernej Makovsek,
developer at MyProfitSee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spyne.io/archives/people/attachments/20140916/ead5d38e/attachment.html>


More information about the people mailing list