I'm new to programming, and have been trying to use Google Translate API. I'm running into this issue and have tried to find a solution to no avail. I've created a Google Service Account, and Key. I'm on a Mac inside Jupyter Notebook.
Error:
~/opt/anaconda3/lib/python3.7/site-packages/google/cloud/client.py in __init__(self, credentials, _http, client_options) 141 raise ValueError(_GOOGLE_AUTH_CREDENTIALS_HELP) 142 --> 143 scopes = client_options.scopes or self.SCOPE 144 145 # if no http is provided, credentials must exist AttributeError: 'ClientOptions' object has no attribute 'scopes' My Code:
import os from google.cloud import translate_v2 os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="cloud_key.json" translate_client = translate.Client()