[google-appengine] Re: UnicodeEncodeError when using bulkupload to download from datastore

2009-08-02 Thread iceanfire

the name is: description

On Aug 1, 8:58 pm, Holger w...@arcor.de wrote:
 What's the name of your 'TextProperty' field?

  I tracked this error down to a 'TextProperty' Field in the datastore.

 If this name should contain strange letters (ÄÜÖ etc) try changing the
 name.

 ---
 Re Datastore upload: That's an important question - would be
 interested in an answer too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: UnicodeEncodeError when using bulkupload to download from datastore

2009-08-02 Thread djidjadji

The string you want to store contains characters that are not in the
ascii range 0..127.
You string uses some encoding, like utf-8 or iso8859-
You must tell in your bulkloader that it is not a byte string, but a
string with a certain encoding.
Use a lambda function that converts it to a unicode using the right encoding.

lambda x : unicode(x,'utf-8')

Look in the python docs for the unicode() function what other
encodings you can use

2009/8/2 iceanfire iceanf...@gmail.com:

 I'm getting the following error when I download from the datastore:

 UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in
 position 265: ordinal not in range(128)

 I tracked this error down to a 'TextProperty' Field in the datastore.
 Any idea how I should deal with this?

 Also, I had a quick question about using the bulkupload.py tool.
 Initially, I had wanted to use it to backup the datastore--incase
 (during my experimentation) I accidentally messed up anything.
 However, now that I think about it, it'll be almost impossible to do
 this if my datastore structure uses reference properties right?
 Because deleting a table and then re-uploading it would change all the
 keys etc... Any way around this?


 thanks!
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: UnicodeEncodeError when using bulkupload to download from datastore

2009-08-01 Thread Holger

What's the name of your 'TextProperty' field?

 I tracked this error down to a 'TextProperty' Field in the datastore.
If this name should contain strange letters (ÄÜÖ etc) try changing the
name.

---
Re Datastore upload: That's an important question - would be
interested in an answer too.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---