GAE“没有属性”HTTPSHandler“”dev_appserver.py

我试图从我的Ubuntu的明智使用谷歌appengine python SKD。 我已经编译了python2.5。 但是,当我执行任何“dev_appserver.py”命令,我得到以下错误:

Traceback (most recent call last): File "dev_appserver.py", line 69, in <module> run_file(__file__, globals()) File "dev_appserver.py", line 65, in run_file execfile(script_path, globals_) File "/home/rohan/workspace/app_en/google_appengine/google/appengine/tools/dev_appserver_main.py", line 90, in <module> from google.appengine.tools import appcfg File "/media/Ultimate/WebD/django/app_engine/google_appengine/google/appengine/tools/appcfg.py", line 59, in <module> from google.appengine.tools import appengine_rpc File "/media/Ultimate/WebD/django/app_engine/google_appengine/google/appengine/tools/appengine_rpc.py", line 24, in <module> import fancy_urllib File "/media/Ultimate/WebD/django/app_engine/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py", line 328, in <module> class FancyHTTPSHandler(urllib2.HTTPSHandler): AttributeError: 'module' object has no attribute 'HTTPSHandler' 

我已经检查了python2.6和python2.5的urllib2模块,但是在模型定义方面没有区别,在python2.5中也有HTTPSHandelr。 所以我猜这是一些其他的错误。

我试图用默认的python2.6运行,但是我得到以下错误:

 WARNING 2010-09-11 12:08:40,848 datastore_file_stub.py:657] Could not read datastore data from /tmp/dev_appserver.datastore Traceback (most recent call last): File "./dev_appserver.py", line 69, in <module> run_file(__file__, globals()) File "./dev_appserver.py", line 65, in run_file execfile(script_path, globals_) File "/home/rohan/workspace/app_en/google_appengine/google/appengine/tools/dev_appserver_main.py", line 449, in <module> sys.exit(main(sys.argv)) File "/home/rohan/workspace/app_en/google_appengine/google/appengine/tools/dev_appserver_main.py", line 426, in main static_caching=static_caching) File "/home/rohan/workspace/app_en/google_appengine/google/appengine/tools/dev_appserver.py", line 3820, in CreateServer server = HTTPServerWithScheduler((serve_address, port), handler_class) File "/home/rohan/workspace/app_en/google_appengine/google/appengine/tools/dev_appserver.py", line 3840, in __init__ request_handler_class) File "/usr/lib/python2.6/SocketServer.py", line 400, in __init__ self.server_bind() File "/usr/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind SocketServer.TCPServer.server_bind(self) File "/usr/lib/python2.6/SocketServer.py", line 411, in server_bind self.socket.bind(self.server_address) File "<string>", line 1, in bind socket.error: [Errno 98] Address already in use 

它适用于窗户,甚至在酒下。

更新
python2.6问题解决了。
我已经configuration了我的apache服务器在8080和80端口上的django部署早些时候。

但是python2.5 isntallation仍然有同样的错误。

Solutions Collecting From Web of "GAE“没有属性”HTTPSHandler“”dev_appserver.py"

解决了这个问题…只需要建立所有python的依赖使用:

apt-get build-dep python

python编译没有错误,即使没有安装所有的依赖关系。 它只是跳过需要他们的模块,并建立python。

解决方案丢失HTTPSHandler:

在从源代码构建python 2.5之前,您需要通过编辑modulees / Setup.dist来启用ssl-socket(更多信息,请参阅http://paltman.com/2007/nov/15/getting-ssl-support-in-python-251 / )

在这篇文章中描述的方法完全适合我(Ubuntu 11.10)。

http://dewbot.posterous.com/installation-of-python-25-and-google-app-engi