【发布时间】:2018-12-07 20:29:19
【问题描述】:
我的本地 python 应用程序使用 httplib2 调用 REST api。一年多来一直运行良好。今天早上我开始收到以下错误:
2018-06-28 12:43:07.001 Python[1722:25727] IMKInputSession [0x7f99e21ac2f0 presentFunctionRowItemTextInputViewWithEndpoint:completionHandler:] : [self textInputContext]=0x7f99dfd48440 *NO* NSRemoteViewController to client, NSError=Error Domain=NSCocoaErrorDomain Code=4097 "connection from pid 0" UserInfo={NSDebugDescription=connection from pid 0}, com.apple.inputmethod.EmojiFunctionRowItem
最初,我认为这是由于我的 openSSL 证书过期造成的。我已经更新到 openSSL 1.1。我也从 python 3.6 更新到 3.7。我仍然遇到同样的错误。
调用的代码如下。
connection = httplib2.HTTPSConnectionWithTimeout(URL, 443, timeout = 300)
print('Connection made')
self.headers = {"Accept":"application/json", "Authorization":Token}
print(connection)
connection.request('GET', request_command, body=None
headers=self.headers)
print('request made')
错误是由connection.request()引起的。
【问题讨论】:
标签: python python-3.x rest https httplib2