Hi Marzia,
Thanks for taking the time to look at this for me. I've tried running
the code again and it still seems to display the problem, so it
doesn't seem to be related to the outages you mentioned.
I've created a minimal test case which reproduces the error, and I've
pasted this code in below. It declares the two data models, creates
some test data, and then performs the same query as I was performing
originally. I can successfully run this code locally, but not after
uploading it to the server. I'm quite new to App Engine development,
so it may be that I'm doing something odd in the code, but the fact
that it runs locally but not on the server makes me curious as to what
is happening!
Many thanks,
Jerome
from google.appengine.ext import db
print "AppEngine test case"
# The parent class
class Band(db.Model):
Name = db.StringProperty(required=True)
URL = db.StringProperty(required=True)
Description = db.TextProperty()
Sections = db.ListProperty(db.Key)
# The child class
class Section(db.Model):
Title = db.StringProperty(required=True)
URL = db.StringProperty(required=True)
Type = db.StringProperty(required=True, choices=set(["Gallery",
"News", "Information", "Release", "Event", "People", "Link",
"Contact"]))
# Create one parent Band and two child Sections as test objects
NewBand = Band(Name="Test", URL="Test", Description="A test
description")
NewBand.put()
NewSection = Section(parent=NewBand, Title="News", URL="News",
Type="News")
NewSection.put()
NewBand.Sections.append(NewSection.key())
NewSection = Section(parent=NewBand, Title="Info", URL="Info",
Type="Information")
NewSection.put()
NewBand.Sections.append(NewSection.key())
NewBand.put()
# Try to get from the datastore the Section with a URL of 'Info',
# which is a also child of the Band we just created
# This is the part which works locally but fails when run on the
server
SectionURL = "Info"
TestSection = Section.all().ancestor(NewBand).filter("URL = ",
SectionURL).get()
# If this works, output the Title of the section we retrieved
if (TestSection):
print "Section retrieved: '" + TestSection.Title + "'"
On Jun 16, 7:23 pm, "Marzia Niccolai" <
ma...@google.com> wrote:
> Hi Jerome,
> First, during the weekend we did experience some intermittent datastore
> outages, please see:
http://groups.google.com/group/google-appengine-downtime-notify
>
> If this was not part of the problem you were hitting, would you mind
> providing some more details? If you could provide the Section data model,
> as well as the ancestor data model that would be helpful. Additionally, it
> would be nice to have the code that generates the ancestor object on which
> you are filtering, as well as the data that is stored in the ancestor
> object.
>
> Thanks,
> Marzia
>
> On Sun, Jun 15, 2008 at 5:40 AM, Jerome West <
JeromeCW...@googlemail.com>