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 #4387DescriptionCommit 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
Activitydhermes commented on Nov 13, 2017 dhermes commented on Nov 13, 2017 @mathewcohle Did we release this bug or you are just installing from HEAD? dhermes commented on Nov 13, 2017 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 added a commit that references this issue on Nov 13, 2017This issue will close once commit 3f940b9 is merged into the 'master' branch.3f940b9 added a commit that references this issue on Nov 13, 2017This issue will close once commit a105bba is merged into the 'main' branch.a105bba mathewcohle commented on Nov 13, 2017 dhermes commented on Nov 13, 2017 Sure thing @mathewcohle.
I'm still curious how you're installing, if you'd like to share. mathewcohle commented on Nov 13, 2017 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. dhermes commented on Nov 13, 2017 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.) added 2 commits that reference this issue on Nov 15, 2017This issue will close once commit a31375f is merged into the 'master' branch.a31375f This issue will close once commit 9555b70 is merged into the 'master' branch.9555b70 added a commit that references this issue on Nov 24, 2025This issue will close once commit 91bd345 is merged into the 'main' branch.91bd345
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|