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

A query object has no cursor #643

Copy link
Copy link

Description

@jonathan-s
Issue body actions

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/ndb/schema_update/main.py#L127

Did you change the file? If so, how?

We get the cursor from the following line: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/ndb/schema_update/main.py#L105 So I changed the file to use that.

Describe the issue

Returns the following error: 'Query' object has no attribute 'cursor'

'Query' object has no attribute 'cursor' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1535, in __call__ rv = self.handle_exception(request, response, e) File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1529, in __call__ rv = self.router.dispatch(request, response) File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1278, in default_dispatcher return route.handler_adapter(request, response) File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 1102, in __call__ return handler.dispatch() File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 572, in dispatch return self.handle_exception(e, self.app.debug) File "/usr/local/lib/python2.7/dist-packages/webapp2.py", line 570, in dispatch return method(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/google/appengine/ext/deferred/deferred.py", line 310, in post self.run_from_request() File "/usr/local/lib/python2.7/dist-packages/google/appengine/ext/deferred/deferred.py", line 305, in run_from_request run(self.request.body) File "/usr/local/lib/python2.7/dist-packages/google/appengine/ext/deferred/deferred.py", line 147, in run return func(*args, **kwds) File "/home/vmagent/app/views/update_schema.py", line 50, in update_schema_task update_schema_task, cursor=query.cursor(), num_updated=num_updated) AttributeError: 'Query' object has no attribute 'cursor'
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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.