google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

No way to define timeout for mediaItems().batchCreate().execute()?

Open and7ey opened this issue 1 year ago • 0 comments

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?

and7ey avatar Aug 10 '24 08:08 and7ey