On Feb 26, 2:15 am, ken <
kreis...@gmail.com> wrote:
> I think you're right -- the intermittent errors are due to UTF-8
> characters present in some of my inputs. The errors go away when I
> convert from UTF-8 to ascii. Without converting to ascii, the errors
> do not eventually succeed on their own.
>
> Btw, thanks for creating such a wonderful package!
>
> Ken
Hi Ken,
I got exactly the same problem as you. Here is my case: I'm writing an
application that takes an user's input and query SimpleDB to find
matched items. Everything's ok if the input is ascii but as soon as
the user enters some unicode string, the latest svn version of boto
failed with UnicodeEncodeError as below:
File "/usr/lib/python2.5/site-packages/boto/connection.py" in
make_request
263. h.update(str(params[key]))
Exception Type: UnicodeEncodeError at /search/
Exception Value: 'ascii' codec can't encode character u'\u0169' in
position 32: ordinal not in range(128)
When I encoded the input to 'utf-8' (as suggested by
http://paltman.com/2008/02/09/another-unicode-patch-to-boto/), it
passed the UnicodeEncodeError but failed with 403 Signature Doesn't
Match like you.
It seems that we have to:
1. wait for Amazon SimpleDB to support utf-8
2. then patch boto to encode strings to utf-8 before sending them to
Amazon.
Regards,
-Thai