my app suddenly shows an error! yesterday, everything OK

46 views
Skip to first unread message

manuelaraoz

unread,
May 7, 2009, 9:58:26 PM5/7/09
to Google App Engine
All of a sudden, a page in my app stopped functioning
This is weird, as I have not deployed anything new, and it was working
great yeasterday...

Could it be an internal change that drove to this error?

A web page in my app doesn't load... it's handler is practice.py
it uses an access to datastore, where it fails..
I can't seem to understand where the error comes in order to prevent
it!
Can anyone help? thanks in advance.. :D

This is the traceback:
Traceback (most recent call last):
File "/base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 501, in __call__
handler.get(*groups)
File "/base/data/home/apps/*********/6.333284999050902755/
decorators.py", line 38, in onlyLogged
func(*args, **keyargs)
File "/base/data/home/apps/*********/6.333284999050902755/
practice.py", line 290, in get
users = users.fetch(usersppage, offset)
File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1426, in fetch
raw = self._get_query().Get(limit, offset)
File "/base/data/home/apps/*********/6.333284999050902755/
bookmark.py", line 289, in _get_query
self.__query = super(Query, self)._get_query
(_query_class=BookmarkQuery)
File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1591, in _get_query
keys_only=self._keys_only)
TypeError: __init__() got an unexpected keyword argument 'keys_only'


I'm using a custom Query class called BookmarkQuery
everything was working quite OK with it until today (the error seems
to be related to it)

any ideas of why this is happening?
I repeat, the error appeared out of nowhere... yesterday my app was
working perfectly
Thanks!

Manuel

ryan

unread,
May 8, 2009, 1:05:00 AM5/8/09
to Google App Engine
hi manuel! we pushed a new version of our API code to production
recently in preparation for an upcoming release, which has caused
problems for people who use forked versions of some of our API code,
like the problem described in
http://groups.google.com/group/google-appengine/browse_thread/thread/8e9267e3c9346317
, or code that reaches below our API layer, which it sounds like
BookmarkQuery does.

i don't have the BookmarkQuery source, so i don't know the exact fix
you need, but the problem stems from a new optional keyword argument
that we added to the Query classes' constructors. try adding a
keys_only=None parameter to BookmarkQuery's constructor and see if
that helps.

Manu

unread,
May 8, 2009, 10:15:09 AM5/8/09
to Google App Engine
the code for BookmarkQuery is here:
http://bitbucket.org/moraes/appengine/src/422cc9b9473b/bookmark.py


I'm using it but haven't developed it myself, so I don't really know
how it works.
Please help me, isn't there a way to quickly fix this at least for the
moment?
Thanks in advance!

Manuel



On 8 mayo, 02:05, ryan <ryanb+appeng...@google.com> wrote:
> hi manuel! we pushed a new version of our API code to production
> recently in preparation for an upcoming release, which has caused
> problems for people who use forked versions of some of our API code,
> like the problem described inhttp://groups.google.com/group/google-appengine/browse_thread/thread/...

Nick Johnson (Google)

unread,
May 8, 2009, 10:27:07 AM5/8/09
to google-a...@googlegroups.com
Hi Manu,

For now you can get things working again by replacing lines 36 and 37
of bookmark.py with this:
---
def __init__(self, kind, filters={}, _app=None, keys_only=False):
super(BookmarkQuery, self).__init__(kind, filters, _app, keys_only)
---

-Nick Johnson

Manu

unread,
May 8, 2009, 11:04:20 AM5/8/09
to Google App Engine
Hi!

Thanks a bunch!
That fixed all :D:D:D

Will that work after the upcoming release?
Can I ask you (if you have time, tell me, if not, no problem)
why was that failing? I'd really like to understand a little more.

Also, I'd like to understand how all of this BookmarkQuery works...
I'll have to read the source and learn a bit
Thanks for your time!

Manu

On 8 mayo, 11:27, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:
> Hi Manu,
>
> For now you can get things working again by replacing lines 36 and 37
> of bookmark.py with this:
> ---
>     def __init__(self, kind, filters={}, _app=None, keys_only=False):
>         super(BookmarkQuery, self).__init__(kind, filters, _app, keys_only)
> ---
>
> -Nick Johnson
>

Kwame

unread,
May 9, 2009, 8:08:11 PM5/9/09
to Google App Engine
I just upgraded to version 1.2.2 and I'm getting a similar error:

Exception exceptions.SystemError: 'error return without exception set'
in <generator object at 0x3033300> ignored
ERROR 2009-05-10 00:04:36,585 __init__.py:385] __init__() got an
unexpected keyword argument 'keys_only'
Traceback (most recent call last):
...

File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 1381, in get
results = self.fetch(1)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 1425, in fetch
raw = self._get_query().Get(limit, offset)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 1590, in _get_query
keys_only=self._keys_only)
TypeError: __init__() got an unexpected keyword argument 'keys_only'
...


I'm not using BookmarkQuery, so how do I fix this???

Please help!

Jason (Google)

unread,
May 11, 2009, 1:39:57 PM5/11/09
to google-a...@googlegroups.com
Were you prompted to update within GoogleAppEngineLauncher or did you manually choose to update by selecting "Check for Updates" in GoogleAppEngineLauncher's Help menu?

- Jason

Kwame Iwegbue

unread,
May 11, 2009, 2:24:23 PM5/11/09
to google-a...@googlegroups.com
I was prompted to update it. However the problem resolved after I restarted the JVM.


Rodrigo Amaral

unread,
May 11, 2009, 2:41:09 PM5/11/09
to google-a...@googlegroups.com
I'm getting a slightly different error. My application behaves like
the API had not been upgraded yet, but the Query object is called in
the "new" way. Please note that the only thing I do in this case is to
call the all() method of the model. Here's the traceback:

Traceback (most recent call last):
File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py",
line 501, in __call__
handler.get(*groups)
File "/base/data/home/apps/f1gp/3.333345031119336744/f1gp.py", line
116, in get
'pilotos' : Piloto.all() }))
File "/base/python_lib/versions/1/google/appengine/ext/webapp/template.py",
line 81, in render
return t.render(Context(template_dict))
File "/base/python_lib/versions/1/google/appengine/ext/webapp/template.py",
line 121, in wrap_render
return orig_render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
168, in render
return self.nodelist.render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
705, in render
bits.append(self.render_node(node, context))
File "/base/python_lib/versions/1/django/template/__init__.py", line
718, in render_node
return(node.render(context))
File "/base/python_lib/versions/1/django/template/loader_tags.py",
line 82, in render
return compiled_parent.render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
168, in render
return self.nodelist.render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
705, in render
bits.append(self.render_node(node, context))
File "/base/python_lib/versions/1/django/template/__init__.py", line
718, in render_node
return(node.render(context))
File "/base/python_lib/versions/1/django/template/loader_tags.py",
line 23, in render
result = self.nodelist.render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
705, in render
bits.append(self.render_node(node, context))
File "/base/python_lib/versions/1/django/template/__init__.py", line
718, in render_node
return(node.render(context))
File "/base/python_lib/versions/1/django/template/loader_tags.py",
line 23, in render
result = self.nodelist.render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
705, in render
bits.append(self.render_node(node, context))
File "/base/python_lib/versions/1/django/template/__init__.py", line
718, in render_node
return(node.render(context))
File "/base/python_lib/versions/1/django/template/defaulttags.py",
line 99, in render
values = list(values)
File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py",
line 1372, in __iter__
return self.run()
File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py",
line 1360, in run
iterator = self._get_query().Run()
File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py",
line 1591, in _get_query
keys_only=self._keys_only)
AttributeError: 'Query' object has no attribute '_keys_only'



Do you guys have any clue?

Thanks in advance!

Rodrigo Amaral
--
Rodrigo Amaral
rodrig...@gmail.com

Rodrigo Amaral

unread,
May 8, 2009, 1:34:19 PM5/8/09
to Google App Engine
Hello, Ryan

My application is also broken, but shows a slightly different error.
I'm not using any fork of the Query class. Here's the log:

Traceback (most recent call last):
File "/base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 501, in __call__
handler.get(*groups)
File "/base/data/home/apps/f1gp/3.333344007892917312/f1gp.py", line
50, in get
'noticias' : Noticia.get_recentes(),}))
File "/base/python_lib/versions/1/google/appengine/ext/webapp/
line 209, in render
return self.nodelist_true.render(context)
File "/base/python_lib/versions/1/django/template/__init__.py", line
705, in render
bits.append(self.render_node(node, context))
File "/base/python_lib/versions/1/django/template/__init__.py", line
718, in render_node
return(node.render(context))
File "/base/python_lib/versions/1/django/template/defaulttags.py",
line 99, in render
values = list(values)
File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1372, in __iter__
return self.run()
File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1360, in run
iterator = self._get_query().Run()
File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1591, in _get_query
keys_only=self._keys_only)
AttributeError: 'Query' object has no attribute '_keys_only'



Do you guys know a way to workaround this one?

Thanks in advance!

Rodrigo Amaral


On 8 maio, 02:05, ryan <ryanb+appeng...@google.com> wrote:
> hi manuel! we pushed a new version of our API code to production
> recently in preparation for an upcoming release, which has caused
> problems for people who use forked versions of some of our API code,
> like the problem described inhttp://groups.google.com/group/google-appengine/browse_thread/thread/...

Kwame

unread,
May 13, 2009, 10:29:07 AM5/13/09
to Google App Engine
I had a similar problem after upgrading to v 1.2.2
first I tried to roll back the update but I was unable to, but somehow
the issue resolved after I restarted my computer.

hope that helps

Rodrigo Amaral

unread,
May 13, 2009, 12:34:04 PM5/13/09
to google-a...@googlegroups.com
The application works fine on localhost. This problem only shows up
after deploy. It looks like the API version of the production
environment had not been upgraded yet. It's a really weird situation
and I can't figure out how to fix it.

Suggestions are welcome. Thanks!
--
Rodrigo Amaral
rodrig...@gmail.com
Reply all
Reply to author
Forward
0 new messages