google-api-python-client
google-api-python-client copied to clipboard
No way to define timeout for mediaItems().batchCreate().execute()?
I am migrating my old Python 2.7 version to Python 2.10.
response = requests.post('https://photoslibrary.googleapis.com/v1/uploads', headers=headers, data=data)
works fine, but when I call
response = gphotos.mediaItems().batchCreate(body=body).execute()
I get the following exception (<class 'TimeoutError'>, TimeoutError(110, 'Connection timed out'), <traceback object at 0x42266b88>)
The Google console shows multiple timeout errors.
What could be wrong here? Is there any way to increase timeout for execute?