GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Datastore: unexpected keyword arg in DS client · Issue #4387 · googleapis/google-cloud-python

Datastore: unexpected keyword arg in DS client #4387

New issue
Copy link
New issue
Copy link
Closed
Closed
Datastore: unexpected keyword arg in DS client#4387
Copy link
Assignees
dhermes
Labels
api: datastoreIssues related to the Datastore API.status: investigatingThe issue is under investigation, which is determined to be non-trivial.

Description

@mathewcohle
mathewcohle
opened on Nov 13, 2017
Issue body actions

Commit 9246de7 introduced following bug:

  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py", line 321, in get
    eventual=eventual)
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py", line 376, in get_multi
    transaction_id=transaction and transaction.id,
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/datastore/client.py", line 138, in _extended_lookup
    keys=key_pbs,
TypeError: lookup() got an unexpected keyword argument 'project_id'

Patch

From 7470329ecf13d9f85bfe8af71ee533856ff9ec4c Mon Sep 17 00:00:00 2001
From: mathewcohle <[email protected]>
Date: Mon, 13 Nov 2017 11:41:01 +0100
Subject: [PATCH] Fix wrong keyword argument name introduced in #4348

---
 datastore/google/cloud/datastore/client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datastore/google/cloud/datastore/client.py b/datastore/google/cloud/datastore/client.py
index a3d1f9d43..c42c75e32 100644
--- a/datastore/google/cloud/datastore/client.py
+++ b/datastore/google/cloud/datastore/client.py
@@ -133,7 +133,7 @@ def _extended_lookup(datastore_api, project, key_pbs,
     while loop_num < _MAX_LOOPS:  # loop against possible deferred.
         loop_num += 1
         lookup_response = datastore_api.lookup(
-            project_id=project,
+            project=project,
             read_options=read_options,
             keys=key_pbs,
         )
-- 
2.15.0

Info (datastore installed from current master via pip install git+https://github.com/GoogleCloudPlatform/google-cloud-python.git#subdirectory=datastore)

$ pip freeze | grep google

gapic-google-cloud-error-reporting-v1beta1==0.15.3
gapic-google-cloud-logging-v2==0.91.3
gax-google-logging-v2==0.8.3
gax-google-pubsub-v1==0.8.3
google-api-core==0.1.1
google-api-python-client==1.6.4
google-auth==1.2.0
google-cloud==0.30.1.dev1
google-cloud-bigquery==0.28.0
google-cloud-bigtable==0.28.1
google-cloud-core==0.28.0
google-cloud-datastore==1.4.1.dev1
google-cloud-dns==0.28.0
google-cloud-error-reporting==0.28.0
google-cloud-firestore==0.28.0
google-cloud-language==1.0.0
google-cloud-logging==1.4.0
google-cloud-monitoring==0.28.0
google-cloud-pubsub==0.29.0
google-cloud-resource-manager==0.28.0
google-cloud-runtimeconfig==0.28.0
google-cloud-spanner==0.29.0
google-cloud-speech==0.30.0
google-cloud-storage==1.6.0
google-cloud-trace==0.16.0
google-cloud-translate==1.3.0
google-cloud-videointelligence==0.28.0
google-cloud-vision==0.28.0
google-gax==0.12.5
google-resumable-media==0.3.1
googleapis-common-protos==1.5.3
grpc-google-iam-v1==0.11.4
grpc-google-logging-v2==0.8.1
grpc-google-pubsub-v1==0.8.1
proto-google-cloud-error-reporting-v1beta1==0.15.3
proto-google-cloud-logging-v2==0.91.3

Activity

  1. dhermes commented on Nov 13, 2017

    @dhermes
    dhermes
    on Nov 13, 2017
    Contributor
    More actions

    @mathewcohle Thanks for reporting. I'll jump on a fix ASAP.

  2. dhermes commented on Nov 13, 2017

    @dhermes
    dhermes
    on Nov 13, 2017
    Contributor
    More actions

    @mathewcohle Did we release this bug or you are just installing from HEAD?

  3. dhermes
    added
    api: datastoreIssues related to the Datastore API.
    on Nov 13, 2017
  4. dhermes
    self-assigned this
    on Nov 13, 2017
  5. dhermes
    added
    status: investigatingThe issue is under investigation, which is determined to be non-trivial.
    on Nov 13, 2017
  6. dhermes commented on Nov 13, 2017

    @dhermes
    dhermes
    on Nov 13, 2017
    Contributor
    More actions

    As I suspected, this only applies to the HTTP transport which is why it didn't get picked up by any of our system tests. (Though I'm surprised it didn't get picked up by unit tests.)

    /cc @lukesneeringer

  7. dhermes
    added a commit that references this issue on Nov 13, 2017

    Updating datastore HTTP wrapper.

    This issue will close once commit 3f940b9 is merged into the 'master' branch.
    3f940b9
  8. dhermes
    closed this as completedin #4388on Nov 13, 2017
  9. dhermes
    added a commit that references this issue on Nov 13, 2017

    Updating datastore HTTP wrapper. (#4388)

    This issue will close once commit a105bba is merged into the 'main' branch.
    a105bba
  10. mathewcohle commented on Nov 13, 2017

    @mathewcohle
    mathewcohle
    on Nov 13, 2017
    Author
    More actions

    @dhermes Thanks for a quick fix!

  11. dhermes commented on Nov 13, 2017

    @dhermes
    dhermes
    on Nov 13, 2017
    Contributor
    More actions

    Sure thing @mathewcohle.

    I'm still curious how you're installing, if you'd like to share.

  12. mathewcohle commented on Nov 13, 2017

    @mathewcohle
    mathewcohle
    on Nov 13, 2017
    Author
    More actions

    I installed via

    pip install git+https://github.com/GoogleCloudPlatform/google-cloud-python.git#subdirectory=datastore
    

    (i.e. current master) as I wanted to include 69a9840.

    I have not found a way to specify Datastore version when installing via pip install google-cloud as it seemed to install the lowest version specified in setup.py -> >= 1.4.0, thus I firstly installed datastore from subdir and then install the rest of libraries.

  13. dhermes commented on Nov 13, 2017

    @dhermes
    dhermes
    on Nov 13, 2017
    Contributor
    More actions

    Thanks for the info!

    I have not found a way to specify Datastore version when installing via pip install google-cloud

    I recommend you never use the google-cloud package. It is much too generic to be helpful. (It's very unlikely that any Python application would use more than 4 packages.)

    Reacted by Matej Čamaj
  14. chemelnucfin
    added 2 commits that reference this issue on Nov 15, 2017

    Updating datastore HTTP wrapper. (googleapis#4388)

    This issue will close once commit a31375f is merged into the 'master' branch.
    a31375f

    Updating datastore HTTP wrapper. (googleapis#4388)

    This issue will close once commit 9555b70 is merged into the 'master' branch.
    9555b70
  15. theacodes
    unassigned
    dhermes
    on Sep 28, 2018
  16. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  17. parthea
    added a commit that references this issue on Jul 6, 2023

    Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatfor…

    cab9ce8
  18. parthea
    added a commit that references this issue on Sep 22, 2023

    chore: move samples from python-docs-sample (#66)

    d3dcbbc
  19. parthea
    added a commit that references this issue on Oct 21, 2023

    move monitoring samples from python-docs-samples (#51)

    d95f563
  20. parthea
    added a commit that references this issue on Aug 21, 2025

    Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatfor…

    03b3983
  21. parthea
    added a commit that references this issue on Sep 16, 2025

    Update dependency google-auth to v1.20.0 [(#4387)](GoogleCloudPlatfor…

    74bff59
  22. parthea
    added a commit that references this issue on Nov 24, 2025

    Updating datastore HTTP wrapper. (#4388)

    This issue will close once commit 91bd345 is merged into the 'main' branch.
    91bd345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: datastoreIssues related to the Datastore API.status: investigatingThe issue is under investigation, which is determined to be non-trivial.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.