Open
Description
Thanks for stopping by to let us know something could be better!
If you are still having issues, please be sure to include as much information as possible:
Environment details
- OS type and version: Linux
google-api-python-client
version:pip show google-api-python-client
Code example
from googleapiclient import discovery
ml_v1 = discovery.build("ml", "v1")
ml_v1.projects().locations().studies().list(parent='projects/<my-project>/locations/us-central1').execute()
Stack trace
---------------------------------------------------------------------------
HttpError Traceback (most recent call last)
<ipython-input-7-35c4fabe04d6> in <module>
----> 1 ml_v1_projects_locations_studies.list(parent='projects/140626129697/locations/us-central1').execute()
/opt/conda/lib/python3.7/site-packages/googleapiclient/_helpers.py in positional_wrapper(*args, **kwargs)
129 elif positional_parameters_enforcement == POSITIONAL_WARNING:
130 logger.warning(message)
--> 131 return wrapped(*args, **kwargs)
132
133 return positional_wrapper
/opt/conda/lib/python3.7/site-packages/googleapiclient/http.py in execute(self, http, num_retries)
935 callback(resp)
936 if resp.status >= 300:
--> 937 raise HttpError(resp, content, uri=self.uri)
938 return self.postproc(resp, content)
939
HttpError: <HttpError 501 when requesting https://ml.googleapis.com/v1/projects/140626129697/locations/us-central1/studies?alt=json returned "Operation is not implemented, or supported, or enabled.". Details: "Operation is not implemented, or supported, or enabled.">
The main issue is that baseUrl
is "https://ml.googleapis.com/" instead of "https://us-central1-ml.googleapis.com/".
The https://us-central1-ml.googleapis.com/$discovery/rest?version=v1 discovery doc has this problem as well.
Can you please fix this or send it to the relevant Google teams, so that they fix their discovery docs.