Getting "Request contains an invalid argument" on script v1 requests
See original GitHub issueEnvironment details
- OS: Windows 10 and Ubuntu 16.04
- Python version: 2.7.12
- pip version: 18.1
google-api-python-client
version: 1.7.4 and 1.7.8
I’ve been using the script API for several months but within the last 2 days I am unable to even build the service as I keep getting “Request contains an invalid argument”.
store = Storage('oauth_creds.json')
credentials = store.get()
http = credentials.authorize(httplib2.Http())
service = discovery.build('script', 'v1', http=http)
Traceback is:
Traceback (most recent call last):
File "D:\myscript.py", line 1000, in get_script_service
service = discovery.build('script', 'v1', http=http)
File "C:\Python27\lib\site-packages\googleapiclient\_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\lib\site-packages\googleapiclient\discovery.py", line 230, in build
raise e
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Google App Script API cannot authenticate "Request contains ...
1. Use authorization script at Quickstart. 2. If you want to use the script in your question, please modify from http = credentials.authorize( ......
Read more >Request contains an invalid argument. [246917883]
I'm trying to pull my playlists with Youtube API. The code that works in my local does not work on the server. I'm...
Read more >HTTP status and error codes for JSON | Cloud Storage
Successful requests return HTTP status codes in the 2xx range. ... Example values include Invalid argument , Login required , and Required parameter: ......
Read more >Resolve errors | Google Drive
Resolve a 400 error: Invalid sharing request ... This error can occur for several reasons. To determine the limit that has been exceeded,...
Read more >Error Messages | API Connector for Google Sheets
This error occurs when your request body is incorrectly formatted. Ensure your request body is valid JSON. September 2022 update: Some users may ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried that but it didn’t work for me. Not sure why I had it like this originally but I ended up changing
to this:
service = discovery.build('script', 'v1', credentials=credentials)
and it’s working fine now.
I’m going to close this issue since it will be resolved with #1063.