You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
File "/srv/src/infrastructure/integration/google_cloud_storage.py", line 15, in get_object
google_client = Client.from_service_account_json(GCP_CREDENTIALS_FILE)
File "/env/lib/python3.7/site-packages/google/cloud/client.py", line 86, in from_service_account_json
return cls(*args, **kwargs)
File "/env/lib/python3.7/site-packages/google/cloud/storage/client.py", line 111, in __init__
project=project, credentials=credentials, _http=_http
File "/env/lib/python3.7/site-packages/google/cloud/client.py", line 250, in __init__
Client.__init__(self, credentials=credentials, client_options=client_options, _http=_http)
File "/env/lib/python3.7/site-packages/google/cloud/client.py", line 136, in __init__
if credentials and client_options.credentials_file:
AttributeError: 'ClientOptions' object has no attribute 'credentials_file'
Also, going with simply client = storage.Client() launches the same error, but telling AttributeError: 'ClientOptions' object has no attribute 'scopes'
Edit: Fixed in project by forcing google-cloud-core==1.3.0
Reacted by kidproquo, Jorge Blom, Uriel Reina Abadía, Sandro Huber and kevin-s-postmates
I am seeing the same issue with the new 1.4.0 release.
Ref cloud.py line 136. credentials_file attribute does not exist in client_options if client_options is initialized with the empty constructor (line 134). There are other lines in the same file that refer to attributes for client_options that do not exist if it has been initialized using the empty constructor.
And it fails when creating a Client for any of them: db = firestore.Client()
File "/env/local/lib/python3.7/site-packages/google/cloud/firestore_v1/client.py", line 110, in __init__
project=project, credentials=credentials, _http=None
File "/env/local/lib/python3.7/site-packages/google/cloud/client.py", line 250, in __init__
Client.__init__(self, credentials=credentials, client_options=client_options, _http=_http)
File "/env/local/lib/python3.7/site-packages/google/cloud/client.py", line 143, in __init__
scopes = client_options.scopes or self.SCOPE
AttributeError: 'ClientOptions' object has no attribute 'scopes'
Activity
kidproquo commentedon Aug 5, 2020
I am seeing the same issue with the new 1.4.0 release.
Ref
cloud.pyline 136.credentials_fileattribute does not exist inclient_optionsifclient_optionsis initialized with the empty constructor (line 134). There are other lines in the same file that refer to attributes forclient_optionsthat do not exist if it has been initialized using the empty constructor.s22chan commentedon Aug 5, 2020
It's coming from this change a1e11e1
, which doesn't update the requirements to pin google-api-core==1.19.0 for googleapis/python-api-core@a582936
bommox commentedon Aug 6, 2020
Same problem here.
My requirements:
And it fails when creating a Client for any of them:
db = firestore.Client()fix(deps): fix missing scopes attribute in client_options (#24)
busunkim96 commentedon Aug 6, 2020
Hi folks, sorry about this. @s22chan is correct that this is a result of not increasing the minimum pin on google-api-core.
This should be resolved in 1.4.1. See #19 for the status of the release.
chore: release 1.4.1 (#19)
chore(deps): update dependency google-cloud-core to ~=1.5.0 (#90)
fix(deps): fix missing scopes attribute in client_options (#24)
chore: release 1.4.1 (#19)