Hi, everyone
I'm trying to get an entity by its key. I have a class Session derived
from db.Model
Trying such code:
Session.get('agd0ZXN0YXBwcg0LEgdTZXNzaW9uGBkM')
I get the error:
Traceback (most recent call last):
File "/var/www/google_appengine/google/appengine/ext/admin/
__init__.py", line 218, in post
exec(compiled_code, globals())
File "<string>", line 7, in <module>
File "/var/www/google_appengine/google/appengine/ext/db/
__init__.py", line 992, in get
results = get(keys, rpc=rpc)
File "/var/www/google_appengine/google/appengine/ext/db/
__init__.py", line 1255, in get
model = cls1.from_entity(entity)
File "/var/www/google_appengine/google/appengine/ext/db/
__init__.py", line 1179, in from_entity
instance = cls(None, _from_entity=True, **entity_values)
TypeError: __init__() got an unexpected keyword argument
'_from_entity'
I tried Session.get(Key('agd0ZXN0YXBwcg0LEgdTZXNzaW9uGBkM'))
Also I tried Session.gql("where __key__ = :1",
db.Key('agd0ZXN0YXBwcg0LEgdTZXNzaW9uGBkM')).get()
The error remains same in all cases.
Is it bug? Or I miss something?
Thank you in advance
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.