我是 Python 的新手,目前正在阅读 Head First Python 一书。我正在尝试进行示例练习,但我遇到了来自 GAE 的错误。 我在我的 Kubuntu 10.10 S.O 上同时安装了 Python 2.5 和 GAE。
首先,我创建了一个名为“mygaetest”的文件夹,其中包含文件 sayhello.py 和 app.yaml。 因为 Linux 没有图形前端,所以我从命令行以这种方式启动我的 GAE webapp:
python2.5 google_appengine/dev_appserver.py home/lucas/workspace/Python/Chapter10/src/mygaetest/
但随后显示以下错误:
Traceback (most recent call last):
File "google_appengine/dev_appserver.py", line 78, in
run_file(__file__, globals())
File "google_appengine/dev_appserver.py", line 74, in run_file
execfile(script_path, globals_)
File "/home/lucas/Desarrollo/Python/App
Engine/google_appengine/google/appengine/tools/dev_appserver_main.py", line 118, in
from google.appengine.tools import appcfg
File "/home/lucas/Desarrollo/Python/App
Engine/google_appengine/google/appengine/tools/appcfg.py", line 68, in
from google.appengine.tools import appengine_rpc
File "/home/lucas/Desarrollo/Python/App
Engine/google_appengine/google/appengine/tools/appengine_rpc.py", line 27, in
import fancy_urllib
File "/home/lucas/Desarrollo/Python/App
Engine/google_appengine/lib/fancy_urllib/fancy_urllib/init.py", line 341, in
class FancyHTTPSHandler(urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler'
谁能告诉我该怎么做才能解决该错误?
非常感谢。
最佳答案
欢迎使用 Python、App Engine 和 Stack Overflow!
您的 Python 安装显然缺少 SSL 支持。要添加支持,install this .
http://code.google.com/p/googleappengine/issues/detail?id=19
关于Python 与谷歌应用引擎。属性错误 : 'module' object has no attribute 'HTTPSHandler' error message,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5845611/