我正在编写一个需要连接到 Google 进行身份验证的 Google AppEngine python 应用程序。我一定改变了我在过去 5 天里试图弄清楚的一些事情:这个应用程序以前会在部署在 localhost 上运行(并执行所述身份验证),但现在无法这样做。然而,一旦我部署到 appengine,这个错误就不再存在了。我已经确定这不是互联网连接问题,因为我已将其部署在另一台计算机上,但它仍然给我同样的错误。
这是堆栈跟踪的样子
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\_webapp25.py", line 701, in __call__
handler.get(*groups)
File "C:\Users\username\Desktop\AppEngine Things\engineapp\main.py", line 372, in get
creds = self.GetCodeCredentials()
File "C:\Users\username\Desktop\AppEngine Things\engineapp\main.py", line 323, in GetCodeCredentials
creds = oauth_flow.step2_exchange(code)
File "lib\oauth2client\client.py", line 883, in step2_exchange
headers=headers)
File "lib\httplib2\__init__.py", line 1445, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "lib\httplib2\__init__.py", line 1197, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "lib\httplib2\__init__.py", line 1167, in _conn_request
response = conn.getresponse()
File "lib\httplib2\__init__.py", line 999, in getresponse
raise httplib.HTTPException()
HTTPException