You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UnicodeDecodeError when querying Recurring Profiles. #1
It's been exactly 365 days since you replied and Im just now getting this implemented. What you posted above works a charm. Im not sure though that the characters are being sent properly. I also tried firstnam=u'的' but when I check PayPal Manager, It displays as çš„. Perhaps PayPal manager does not decode unicode? So I tried to do a profile_inquiry to see if I can see the proper value in my interactive shell and hit an error; UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 335: ordinal not in range(128) which is similar to what I got when doing a profile_modify but that was due to me not wrapping the value in unicode (firstname="的" --no u''). As far as profile_inquiry goes, im not quite sure what the next step should be to support unicode coming FROM paypal... Or if that is even the issue.
Im going to continue reading up on unicode in Python but if you have any ideas or suggestions, Im all ears.
Thanks again for your support. This module will haunt you forreeevvverrrr ;)
edit: my latest commit contains your suggestions from your reply above. 495df5f
Activity
johndagostino commentedon Dec 15, 2010
this looks like a simple fix ben.
the _build_parmlist will need to check if the value is a instance of unicode when calculating the lengh
then update the _do_request to encode the paramlist;
update the client.py test file with this at the top
and I updated the profile_modify call to change the first name to
firstname=u'的'
bkeating commentedon Dec 15, 2011
It's been exactly 365 days since you replied and Im just now getting this implemented. What you posted above works a charm. Im not sure though that the characters are being sent properly. I also tried
firstnam=u'的'but when I check PayPal Manager, It displays asçš„. Perhaps PayPal manager does not decode unicode? So I tried to do aprofile_inquiryto see if I can see the proper value in my interactive shell and hit an error;UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 335: ordinal not in range(128)which is similar to what I got when doing aprofile_modifybut that was due to me not wrapping the value in unicode (firstname="的"--nou''). As far asprofile_inquirygoes, im not quite sure what the next step should be to support unicode coming FROM paypal... Or if that is even the issue.Im going to continue reading up on unicode in Python but if you have any ideas or suggestions, Im all ears.
Thanks again for your support. This module will haunt you forreeevvverrrr ;)
edit: my latest commit contains your suggestions from your reply above. 495df5f
Merge pull request #1 from sorter/baid-retrieval