mismatch in UserServices::loginUser: Expected <type 'unicode'> recieved <type 'str'>

Asked by oyzzo

I get this error when i execute this method:

 @ladonize(int,PORTABLE_STRING,rtype=PORTABLE_STRING)
 def loginUser(self,userid,userpass):

mismatch in UserServices::loginUser: Expected <type 'unicode'> recieved <type 'str'>

I'm testing all the methods from validwsdl.com and i have some others accepting PORTABLE_STRING parameters and they just work fine, but this one gives me the unicode/str error. Even the methods where i accept one parameter that's a custom type formed by other types including integers and strings is working fine, so i cannot figure what's going wrong... The only difference is that i use the incomming string to do a comparation like this: if userpass == somepass: ...

but before comparing i use unicode function to turn them both to unicode so in the comparation they are both unicode.

Question information

Language:
English Edit question
Status:
Solved
For:
ladon Edit question
Assignee:
No assignee Edit question
Solved by:
jsgaarde
Solved:
Last query:
Last reply:
Revision history for this message
Best jsgaarde (jakob-simon-gaarde) said :
#1

Hi Oyzzo.

My guess is that you are not returning a unicode string, but I can't say for sure cause you don't show the full traceback nor the full method implementation.

Remember - It's much easier to answer questions when I get the full story (meaning, the whole method and the full exception traceback)

Best Regards
Jakob Simon-Gaarde

Revision history for this message
oyzzo (oyzzoforfree) said :
#2

Hi jsgaarde,

You are right, i wasn't returning an unicode string.

thanks a lot again!

Revision history for this message
oyzzo (oyzzoforfree) said :
#3

Thanks jsgaarde, that solved my question.