简体   繁体   English

在python中刷新Google云端硬盘(OAuth2)中的令牌

[英]Refresh token in Google Drive (OAuth2) in python

I have a python script to upload large file into Google Drive. 我有一个python脚本可将大文件上传到Google云端硬盘。 When passes one hour after the start of the script I get the error: "Refreshing due to a 401 Refreshing access_token" And script exit with error: 在脚本启动后一小时过去时,我收到错误消息: “由于401刷新access_token刷新” ,脚本退出并出现错误:

File "c:\Python27\lib\site-packages\httplib2-0.9-py2.7.egg\httplib2\__init__.py", line 1291, in _conn_request
response = conn.getresponse()
File "c:\Python27\lib\httplib.py", line 1067, in getresponse
response.begin()
File "c:\Python27\lib\httplib.py", line 409, in begin version, status, reason = self._read_status()
File "c:\Python27\lib\httplib.py", line 373, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''*

How to update the token during loading without interrupting it? 如何在加载期间更新令牌而不中断令牌?

As of initial posting, this was a bug in our stack. 在最初发布时,这是我们堆栈中的错误。 The team has been working to address it. 团队一直在努力解决这个问题。

Good news - this bug has now been fixed. 好消息 -该错误现已修复。 Please try again and confirm. 请重试并确认。 You shouldn't need to do anything else during your upload, even if it takes over 1 hour. 即使上传过程超过1个小时,您也无需在上传过程中进行任何其他操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM