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: 'ClientOptions' object has no attribute 'scopes' #2

Open
xdekasx opened this issue Mar 3, 2021 · 1 comment
Open

Comments

@xdekasx
Copy link

xdekasx commented Mar 3, 2021

With django-gmailapi-backend==0.2.0 I get the following error AttributeError: 'ClientOptions' object has no attribute 'scopes' if using together with google-cloud-storage.

The error is when tries to get some file from storage.

Here the traceback:

  File "/usr/local/lib/python3.7/site-packages/storages/backends/gcloud.py", line 243, in url
    blob = self.bucket.blob(name)
  File "/usr/local/lib/python3.7/site-packages/storages/backends/gcloud.py", line 128, in bucket
    self._bucket = self.client.bucket(self.bucket_name)
  File "/usr/local/lib/python3.7/site-packages/storages/backends/gcloud.py", line 121, in client
    credentials=self.credentials
  File "/usr/local/lib/python3.7/site-packages/google/cloud/storage/client.py", line 83, in __init__
    project=project, credentials=credentials, _http=_http
  File "/usr/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 "/usr/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'

From what I've seen I think is related with the requirements google-auth~=1.11.2 or google-api-python-client~=1.7.11 or both, of the django-gmailapi-backend==0.2.0

In my case, using this packages ( a little bit old ) force the dependency google-cloud-core to get the version 1.4.0 causing the error.

For me, the problem is solved by forcing in my requirements.txt the version of google-cloud-core==1.3.0

Will the module be updated to use recent versions of this libraries ( google-auth, google-api-python-client ) ?

Hope it helps,

@dolfim dolfim mentioned this issue Mar 17, 2021
@dolfim
Copy link
Owner

dolfim commented Mar 17, 2021

Hello, a new version with updated dependencies has been released, https://pypi.org/project/django-gmailapi-backend/0.3.0/. In my quick tests it seemed to be working without issues.
Let me know if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants