Re: Problems with WSME + pecan + URL params

85 views
Skip to first unread message

Christophe de Vienne

unread,
Apr 9, 2013, 4:59:48 AM4/9/13
to pytho...@googlegroups.com
Hello Michał,

**kwargs is not supported by WSME. The way to declare your function with WSME is :

@wsexpose(MyDTO, int, text, text, text, text, text)
def get(self, id, node, sid, stid, vmdid):

You will find more details explanations in the documentation :
https://wsme.readthedocs.org/en/latest/functions.html

Cheers,

Christophe


Le 09/04/2013 10:51, Michał Dulko a écrit :
Hello!

In pecans controller I use **kwargs to read URL params:

@expose('json')
def get(self, id, **kwargs):


I want to convert this code to WSME and tried this approach:

@expose(MyDTO, text, node=text, sid=text, stid=text, vmdid=text)
def get(self, id, **kwargs):

When I call my controller with node=0&sla=0&stack=0&vm=0 URL params I get error:

{
    "debuginfo": null,
    "faultcode": "Server",
    "faultstring": "'NoneType' object is not callable"
}

I'm sure that only WSME sends this kind of errors. What is the correct way do decorate that kind of pecan controller?
--
You received this message because you are subscribed to the Google Groups "python-wsme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-wsme...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages