New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After one hour get INFO:oauth2client.client:access_token is expired, but requests keep working #72
Comments
@mozboz could you please share a bit of your code please? How do authentication (once? every time you run it? from a file?). |
@mozboz also, do you see it happening once an hour per thread or after an hour it keeps doing this per request, again and again? Does it print the same |
I have same issue.
|
I only took a quick look at the code. |
Closing as stale |
This is still absolutely a problem. Just encountered it now. Any workarounds? The other login method for PyDrive2 (with client secrets et al.) is way too complex and overkill for what I need to do, and to my experience the credential renewals are super error-prone/requiring a sign in via browser every few days (courtesy of Google I guess). |
@TheManchineel could you share the error one more time please? And your config, how do you setup it? does it happen after you run it for one hour+ or right after you launch it? |
I'm doing a large job to download approx 50k files from google drive.
After exactly an hour I start to see this message:
INFO:oauth2client.client:access_token is expired. Now: 2020-12-17 23:39:39.355448, token_expiry: 2020-12-17 23:06:32.235919
INFO:oauth2client.client:Updated access_token read from Storage
I have a single instance of GoogleDrive which I pass to all processes.
It seems like there must be a valid token as subsequent requests work fine, even though they continue to display this message.
What's the correct way to deal with this?
I'm using Python's multiprocessing to run many processes in parallel, and pass the GoogleDrive object to each worker process.
The text was updated successfully, but these errors were encountered: