Google Mirror API throwing BadStatusLine exception (Python)

你说的曾经没有我的故事 提交于 2019-12-04 12:31:34

This problem appears to be a known issue. I have experienced it myself consistently. If a single file takes more than 1 hour to upload, then this error occurs. If a different file is uploaded the API refreshes the token properly. See this bug for more information. It is apparently not fixed yet and there is no ETA on when it will be fixed. :-(

https://code.google.com/p/google-api-python-client/issues/detail?id=231

The status line is the first line returned by an HTTP response. It contains the status code like 200, 404, 500, etc. If the httplib can't read the status line, it can't read anything about it.

The problem is often caused by a bad HTTP request or a server problem. Try making the request from your browser to see what it shows you. Alternatively, you can use curl or wget to make the request.

Your stack trace shows oauth2client so you must be attempting the OAuth 2 protocol. Maybe the previous request caused the error, and this one simply met a closed door at the server. Logging all requests and responses may help you see what caused the failure.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!