python-samples
python-samples copied to clipboard
googleapiclient.errors.UnknownApiNameOrVersion: name: script version: v1
Expected Behavior
The quickstart.py example (https://developers.google.com/apps-script/api/quickstart/python) should run successfully.
Actual Behavior
Exits with the following error:
Traceback (most recent call last):
File "quickstart.py", line 83, in <module>
main()
File "quickstart.py", line 53, in main
service = build('script', 'v1', credentials=creds)
File "/home/rob/.venv/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "/home/rob/.venv/lib/python3.8/site-packages/googleapiclient/discovery.py", line 273, in build
content = _retrieve_discovery_doc(
File "/home/rob/.venv/lib/python3.8/site-packages/googleapiclient/discovery.py", line 387, in _retrieve_discovery_doc
raise UnknownApiNameOrVersion("name: %s version: %s" % (serviceName, version))
googleapiclient.errors.UnknownApiNameOrVersion: name: script version: v1
Steps to Reproduce the Problem
- Follow the steps at https://developers.google.com/apps-script/api/quickstart/python
Specifications
- Python version (
python --version): Python 3.8.5 - OS (Mac/Linux/Windows): Linux