我如何调用AWS使用Python 3和httplib2会在Windows 7?会在、Python、AWS、Windows

2023-09-11 11:10:38 作者:失她失心╮

我使用httplib2会打电话到亚马逊网络服务(AWS):

I am using httplib2 to make calls to Amazon Web Services (AWS):

http = httplib2.Http(cache='.cache')
response, content = http.request('https://sdb.amazonaws.com/...')

但它失败寻找的CA(我认为):

However it fails looking for CAs (I think):

File "C:\Python32\lib\site-packages\httplib2\__init__.py", line 1059, in request self.disable_ssl_certificate_validation)
File "C:\Python32\lib\site-packages\httplib2\__init__.py", line 772, in __init__ context.load_verify_locations(ca_certs)
IOError: [Errno 2] No such file or directory

我的问题:

有什么我需要做什么来配置我的操作系统和环境,这个工作? 我已经看到了很多关于确保套接字库是专为SSL在Python 2职位;这是否适用于Python的3​​?

谢谢!

推荐答案

httplib2的/ Python3文件夹丢失cacerts.txt,因此它不会被复制到了Python / lib文件夹。我手动复制文件有和一切工作。这是httplib2的一个已知的问题。

The httplib2 /Python3 folder is missing cacerts.txt, so it doesn't get copied to the Python /lib folder. I copied the file there manually and everything worked. This is a known issue with httplib2.