Urgent help needed: A kind of model can not be accessed!

0 views
Skip to first unread message

CNBorn

unread,
Jun 3, 2009, 1:45:02 PM6/3/09
to Google App Engine
Hi All,

I need some help here, for I suddenly found my application can not
found any data in my main model.

You can access http://checknerds.appspot.com to check that.

In the right corner, the second number is the count of that model
(978 or sth).

But there should be a brief list at the bottom, but there is not.
After I logged in, I found there are all signs says that this model is
kind of EMPTY. It looks like I am a new user at all.

But I still can see this model with all its data in Data Viewer. I
have tried to revert my code and updated it again, it won't works.
Before this disaster happened, I am just trying some new ways to count
this model, there is no any write actions against it.

Is there any body who can help me to solve this problem? Thanks.

site: http://checknerds.appspot.com

CNBorn

unread,
Jun 3, 2009, 2:00:01 PM6/3/09
to Google App Engine
By the way, the code runs perfectly on my devserver.

Is this due to GAE's fault?

On 6月4日, 上午1时45分, CNBorn <CNB...@gmail.com> wrote:
> Hi All,
>
> I need some help here, for I suddenly found my application can not
> found any data in my main model.
>
> You can accesshttp://checknerds.appspot.comto check that.

Nick Johnson (Google)

unread,
Jun 3, 2009, 4:15:45 PM6/3/09
to google-a...@googlegroups.com
Hi CBorn,

It's not clear from your post exactly what the problem is. Are you saying you have kinds for which entities are visible in the admin console datastore viewer, but do not appear in query results? If that is the case, you need to show us the query code you're using - more likely than not, it's a problem with the query that's causing it to return 0 results.

-Nick Johnson

CNBorn

unread,
Jun 4, 2009, 12:12:59 AM6/4/09
to Google App Engine
Hi Nick,

Thank you for your response.

First I post a presumption:

Is this problem may possibly related to indexes changes? I found there
is such a index changes during my first deploy (And later, I found
this kind'tarsusaItem' was unable to get)

Created 3 index(es) kinds=tarsusaItem

This is the only thing I can track from my admin log.

I have tried appcfg.py vacuum_indexes, but it doesn't help.

---

the problem is that all my querys against this model gets nothing, and
I didn't change any of them.

The cause of this may due to a modified count function, in which there
is a traversal while loop to count this model(named 'tarsusaItem') in
case it has more than 1000 records.

After I uploaded this code, the weird thing happened.

Later, I will put this count function here.




On 6月4日, 上午4时15分, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:
> Hi CBorn,
>
> It's not clear from your post exactly what the problem is. Are you saying
> you have kinds for which entities are visible in the admin console datastore
> viewer, but do not appear in query results? If that is the case, you need to
> show us the query code you're using - more likely than not, it's a problem
> with the query that's causing it to return 0 results.
>
> -Nick Johnson
>
> On Wed, Jun 3, 2009 at 10:45 AM, CNBorn <CNB...@gmail.com> wrote:
>
> > Hi All,
>
> > I need some help here, for I suddenly found my application can not
> > found any data in my main model.
>
> > You can accesshttp://checknerds.appspot.comto check that.

CNBorn

unread,
Jun 4, 2009, 1:46:37 AM6/4/09
to Google App Engine
Test with a brand new function which will only do simple datastore
queries:

I found when I do the queries without any conditions, for example,
get_by_id or GQLquery(select * FROM tarsusaItem LIMIT 20) will run
smoothly.

Once I put a query my site should executed like SELECT * FROM
tarsusaItem WHERE public = 'public' and routine = 'none' and done =
False ORDER BY date DESC LIMIT 9, it doesn't work.
> > > You can accesshttp://checknerds.appspot.comtocheck that.

CNBorn

unread,
Jun 4, 2009, 10:11:01 AM6/4/09
to Google App Engine
I have played with the index.yaml files. And there is one time I
successed to access this model. But then I tried some new deploys and
It doesn't work again.

I think it might be index's fault, but I can not figured it out. After
serveral deployments now my app encounters a "Your application is
exceeding a quota: Datastore Indices Count ". Can't try further index
settting...

John Tantalo

unread,
Jun 4, 2009, 10:55:06 AM6/4/09
to Google App Engine
I had similar problems with my datastore. At one point, after I added
a new index, all the indexes for my main model failed. I tried
vacuuming the unused indexes in index.yaml. This had the effect of
restoring some of my indexes on my main model but I still cannot do
others, and indexes for other models were also failing.

Next I tried vacuuming *all* my indexes, waiting until they were
deleted, then adding them back. This finally worked and I have full
access to my datastore and indexes.
Reply all
Reply to author
Forward
0 new messages