我正在使用Python Mailchimp API包装器,它突然停止在两台不同的机器上工作。
我的电话和堆栈跟踪看起来像这样:
>>> result = mailchimp_api.lists.member_info(list_id, [{'email': email}])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/<user>/.envs/<myapp>/local/lib/python2.7/site-packages/mailchimp.py", line 1789, in member_info
return self.master.call('lists/member-info', _params)
File "/home/<user>/.envs/<myapp>/local/lib/python2.7/site-packages/mailchimp.py", line 354, in call
r = self.session.post('%s%s.json' % (self.root, url), data=params, headers={'content-type': 'application/json', 'user-agent': 'MailChimp-Python/2.0.9'})
File "/home/<user>/.envs/<myapp>/local/lib/python2.7/site-packages/requests/sessions.py", line 511, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/home/<user>/.envs/<myapp>/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/home/<user>/.envs/<myapp>/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/home/<user>/.envs/<myapp>/local/lib/python2.7/site-packages/requests/adapters.py", line 447, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)
我知道有一些SSL证书问题,但不确定在哪里,以及为什么这只是在两台独立的机器上发生的。