googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
974 stars 249 forks source link

AttributeError: module 'google.auth' has no attribute 'credentials' #2174

Open Kryptonite12 opened 3 years ago

Kryptonite12 commented 3 years ago

My code is breaking at, client = speech.SpeechClient()

Error: Traceback (most recent call last):

File "C:\Users\a.spyder-py3\audio_to_speech.py", line 57, in client = speech.SpeechClient()

File "C:\Users\a\anaconda3\lib\site-packages\google\cloud\speech_v1\services\speech\client.py", line 250, in init self._transport = Transport(

File "C:\Users\a\anaconda3\lib\site-packages\google\cloud\speech_v1\services\speech\transports\grpc.py", line 158, in init self._grpc_channel = type(self).create_channel(

File "C:\Users\a\anaconda3\lib\site-packages\google\cloud\speech_v1\services\speech\transports\grpc.py", line 215, in create_channel return grpc_helpers.create_channel(

File "C:\Users\a\anaconda3\lib\site-packages\google\api_core\grpc_helpers.py", line 275, in create_channel composite_credentials = _create_composite_credentials(

File "C:\Users\a\anaconda3\lib\site-packages\google\api_core\grpc_helpers.py", line 215, in _create_composite_credentials credentials = google.auth.credentials.with_scopes_if_required(credentials, scopes)

AttributeError: module 'google.auth' has no attribute 'credentials'

I am using Python 3.8.3