Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Datastore API key.Key.id() throws TypeError: 'long' object is not callable #2456

Copy link
Copy link

Description

@theoschao
Issue body actions

As part of a datastore query, I get back entities that have a KeyProperty. When trying to call a .id() on the KeyProperty, I get the following TypeError thrown:

TypeError: 'long' object is not callable

Upon examining the particular key, I see this (obfuscated):

<Key[{'kind': u'xxxx', 'id': 1234567890L}], project=xxxx>

Not sure exactly where the TypeError is being thrown, but it looks like the 'id' is being interpreted as a long somehow, when it's actually a standard integer.

I've had to workaround this by doing the following:
Key._path[0].get('id')

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.