小编典典

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

linux

我正在尝试从我的ubuntu lucid使用google 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的

更新
问题。
我早些时候已经为8080和80端口上的Django部署配置了apache服务器。

但是python2.5 istallation仍然存在相同的错误。


阅读 356

收藏
2020-06-07

共1个答案

小编典典

解决了问题…只需使用以下命令即可构建python的所有依赖项:

apt-get build-dep python

即使没有安装所有依赖项,python编译也不会出错。它只是跳过需要它们的模块并构建python。

2020-06-07