Re: [google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-11 Thread Luca de Alfaro
That's what I had at the beginning, and it breaks. This is a bit of a sad situation, as it breaks interoperability in simple ways, but I will try the suggestion of reading without a model and then writing with a model to do an update. I don't love it, as it makes the code ugly and not

[google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-11 Thread Luca de Alfaro
Again thanks for the suggestion. Using the low-level interface works beautifully. I had to read the source code of appengine to figure out wholly how to use it, but once that was done, I almost like the low-level interface more than the high-level one. Entities behave like dictionaries

[google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-10 Thread timh
And here is some example code for getting and putting raw entities - ie no model involved from google.appengine.api import datastorefrom google.appengine.api import datastore_errorsdef get_entities(keys):rpc = datastore.GetRpcFromKwargs({}) keys, multiple =

Re: [google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-10 Thread Luca de Alfaro
I tried to use both default=[] (which did not stop the error from occurring), and required=False (which generated a new error, as the only value allowed for required is True). So it appears that the old solutions for this bug are not viable. A mapreduce would cost a lot of money given the

[google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-10 Thread Luca de Alfaro
Yes, and it did not work. I cannot fix all the data, as the cost would be quite large. This leaves giving up doing what I wanted to do in Python, or fetching the underlying data without a model. Luca On Wednesday, July 10, 2013 12:07:25 AM UTC-7, timh wrote: Have you tried setting the

[google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-10 Thread Luca de Alfaro
required=False generates a new error, stating that the only value for required is True. Luca On Wednesday, July 10, 2013 12:09:56 AM UTC-7, timh wrote: Alternately make the property not required (required=False), load the entities set the value of the list to a [] and then rewrite, once

[google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-10 Thread Luca de Alfaro
Thanks! This is a great suggestion; it might be the only one that works (short of giving up doing what I wanted to do in Python). The interesting thing is that the Java side has no trouble at all reading those entities. Luca On Wednesday, July 10, 2013 12:11:51 AM UTC-7, timh wrote: And

Re: [google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-10 Thread timh
What about just dropping the required parameter from the property have you tried that. On Thursday, July 11, 2013 12:00:17 AM UTC+8, Luca de Alfaro wrote: I tried to use both default=[] (which did not stop the error from occurring), and required=False (which generated a new error, as the

[google-appengine] Re: Error if I set required=False for a StringListProperty

2013-07-09 Thread Luca de Alfaro
This is pretty bad! As pointed out in https://code.google.com/p/googleappengine/issues/detail?id=8962 , if you add a StringListProperty to a model with existing entities in the datastore, then you cannot read those entities any more! Furthermore, in Java it is apparently possible to write

[google-appengine] Re: Error if I set required=False for a StringListProperty

2010-03-23 Thread Wooble
On Mar 22, 11:09 pm, dhruvbird dhruvb...@gmail.com wrote: Hello,   I have a model with a single attribute that is a StringListProperty. I get an error if I define it as such: class Test(db.Expando):     people = db.StringListProperty(required=False, indexed=True) However, on changing it