Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute for 'delete_entry' #360

Closed
sheridangray opened this issue Nov 9, 2014 · 4 comments
Closed
Assignees
Labels
api: datastore Issues related to the Datastore API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@sheridangray
Copy link

When I try and delete an entity with the following code:

entities = dataset.query().kind('request').fetch()
for entity in entities:
    print entity
    entity.delete()

I get the following error:

File "usr/local/lib/python2.7/dist-packages/gcloud/datastore/entity.py", line 206, in delete
self.dataset().connection.delete_entity(
AttributeError: 'NoneType' object has no attribute 'delete_entity'

I found the same issue was identified and closed back in April #86

I may have an out of date version of the repo because when I manually compare my version of entity.py and query.py against the master, my version looks more like the version prior to resolving issue 86.

gcloud/datastore/query.py

- return [Entity.from_protobuf(entity) for entity in entity_pbs]  # WHAT MY VERSION HAS
+ return [Entity.from_protobuf(entity, dataset=self.dataset())
+             for entity in entity_pbs]

However, when I run sudo pip install --upgrade gcloud the output says that the requirement is already up-to-date.

@tseaver
Copy link
Contributor

tseaver commented Nov 9, 2014

The version on PyPI is really old: we need to make a new release. In the meanwhile, you can clone this repository and have pip install it as a "development package":

$ git clone git:github.com/GoogleCloudPlatform/gcloud-python.git
$ cd gcloud-python/
$ /path/to/virtualenv/bin/pip install -e .

@tseaver tseaver closed this as completed Nov 9, 2014
@sheridangray
Copy link
Author

Thank you!

On Sun, Nov 9, 2014 at 11:16 AM, Tres Seaver notifications@github.com
wrote:

Closed #360
#360.


Reply to this email directly or view it on GitHub
#360 (comment)
.

@dhermes
Copy link
Contributor

dhermes commented Nov 10, 2014

@sheridangray You can also install via:

pip install git+https://github.com/GoogleCloudPlatform/gcloud-python.git

@silvolu
Copy link
Contributor

silvolu commented Nov 10, 2014

@jgeewax pinging for access to the package.

@jgeewax jgeewax added the api: datastore Issues related to the Datastore API. label Jan 30, 2015
@jgeewax jgeewax added this to the Datastore Stable milestone Jan 30, 2015
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
parthea added a commit that referenced this issue Jun 4, 2023
fix(deps): require proto-plus >= 1.22.0
parthea pushed a commit that referenced this issue Jun 4, 2023
…360)

Source-Link: googleapis/synthtool@8e55b32
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c6c965a4bf40c19011b11f87dbc801a66d3a23fbc6704102be064ef31c51f1c3

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Jul 6, 2023
Source-Link: googleapis/synthtool@c4dd595
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ce3c1686bc81145c81dd269bd12c4025c6b275b22d14641358827334fddb1d72
parthea pushed a commit that referenced this issue Sep 20, 2023
…pprove] (#360)

Source-Link: https://togithub.com/googleapis/synthtool/commit/e3a1277ac35fc88c09db1930533e24292b132ced
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:452901c74a22f9b9a3bd02bce780b8e8805c97270d424684bff809ce5be8c2a2
parthea pushed a commit that referenced this issue Sep 22, 2023
Source-Link: googleapis/synthtool@050953d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:65e656411895bff71cffcae97246966460160028f253c2e45b7a25d805a5b142

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Sep 22, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/909573ce9da2819eeb835909c795d29aea5c724e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ddf4551385d566771dc713090feb7b4c1164fb8a698fe52bbe7670b24236565b
parthea pushed a commit that referenced this issue Sep 22, 2023
* feat: Add a new fleet registration feature

Users can now register their clusters to a fleet by setting cluster.fleet.project. Please see https://cloud.google.com/anthos/fleet-management/docs/fleet-concepts for more details about fleet management.

PiperOrigin-RevId: 520023539

Source-Link: googleapis/googleapis@0fac9e8

Source-Link: googleapis/googleapis-gen@2319a88
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMxOWE4ODMzMDA0YjFiZTNhMzdiZTViMmIzZTZjYTE0ZGVlNzRkNiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add a new fleet registration feature to v1alpha1, v1beta1, v1

Users can now register their clusters to a fleet by setting cluster.fleet.project. Please see https://cloud.google.com/anthos/fleet-management/docs/fleet-concepts for more details about fleet management.

PiperOrigin-RevId: 520043395

Source-Link: googleapis/googleapis@0f498c7

Source-Link: googleapis/googleapis-gen@cade820
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2FkZTgyMGM2ZThhMTdkY2UzODM1ZDkzOWRkZGVjYmEyZWVkOGY1MSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Sep 22, 2023
Source-Link: googleapis/synthtool@fdba3ed
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1f0dbd02745fb7cf255563dab5968345989308544e52b7f460deadd5e78e63b0

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/cb960373d12d20f8dc38beee2bf884d49627165e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd
parthea pushed a commit that referenced this issue Oct 21, 2023
Source-Link: googleapis/synthtool@6ed3a83
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3abfa0f1886adaf0b83f07cb117b24a639ea1cb9cffe56d43280b977033563eb

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

6 participants