gpt4 book ai didi

python - GAE "no attribute ' HTTPSHandler' "dev_appserver.py

转载 作者:IT王子 更新时间:2023-10-29 00:52:17 25 4
gpt4 key购买 nike

我正在尝试使用我的 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 模块,但模型定义没有区别,并且 HTTPSHandelr 也存在于 python2.5 中。所以我猜这是其他类型的错误。

我也尝试使用默认的 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

它在 windows 甚至在 wine 下运行良好。

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

但是安装python2.5还是有同样的错误。

最佳答案

解决了问题...只需要使用以下方法构建 python 的所有依赖项:

apt-get build-dep python

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

关于python - GAE "no attribute ' HTTPSHandler' "dev_appserver.py,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3690932/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com