I am trying to use the Google Search API, but if I enter a search term
with a funny character like ă then the Google App Engine causes an
error in the Python installation:
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\ext
\webapp\__init__.py", line 499, in __call__
handler.get(*groups)
File "C:\Documents and Settings\RJZ\My Documents\Eclipse Workspace
\google-app-bahblog\main.py", line 1422, in get
for result in query.Run():
File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py", line 849, in Run
return self._Run()
File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py", line 868, in _Run
apiproxy_stub_map.MakeSyncCall('datastore_v3', 'RunQuery', pb,
result)
File "C:\Program Files\Google\google_appengine\google\appengine\api
\apiproxy_stub_map.py", line 46, in MakeSyncCall
stub.MakeSyncCall(service, call, request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore_file_stub.py", line 264, in MakeSyncCall
(getattr(self, "_Dynamic_" + call))(request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore_file_stub.py", line 464, in _Dynamic_RunQuery
results = filter(passes, results)
File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore_file_stub.py", line 448, in passes
filter_val = datastore_types.FromPropertyPb(filter_prop)
File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore_types.py", line 1090, in FromPropertyPb
value = unicode(value.decode('utf-8'))
File "C:\Python25\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0103' in
position 3: ordinal not in range(128)
I tried manipulating the encoding before submitting the string to the
search API but that doesn't help. Any thoughts?
Google: Might a future SDK version include character normalization to
make special characters not needed for search? ă should match a and
vise-versa.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---