Google App Engine上的SSLError(本地devserver)

2024-10-03 13:29:46 发布

您现在位置:Python中文网/ 问答频道 /正文

当我尝试在App Engine上使用boto库时,我得到了下一个错误:

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 "E:\Probes\pruebas\pruebasAWS\main.py", line 26, in get
    conn = S3Connection('<KEY1>','<KEY2>')
  File "E:\Probes\pruebas\pruebasAWS\boto\s3\connection.py", line 148, in __init__
    path=path, provider=provider)
  File "E:\Probes\pruebas\pruebasAWS\boto\connection.py", line 231, in __init__
    self.http_unretryable_exceptions.append(ssl.SSLError)
AttributeError: 'module' object has no attribute 'SSLError'

我已经安装了OpenSSL和python2.7。OpenSSL和SSL-library for python正在运行,当我将应用部署到Google基础设施时,它运行得很好。当我试图在本地计算机上执行应用程序时,问题就出现了。在

代码是:

^{pr2}$

Tags: inpygetinitgooglelinecallconnection
1条回答
网友
1楼 · 发布于 2024-10-03 13:29:46

这里的实际问题是AppEngine与一些东西混在一起,使得导入某些标准的内置python模块(如ssl)变得不可能。在

在boto IRC上有过一些关于这个的对话,其中一个用户想出了这个补丁:

https://github.com/samba/boto/commit/6f1ab73d92ff6fb2589362bbdadf6bbe66811e7e

这种形式很可能很快就会被合并成博图大师。在

相关问题 更多 >