我正在尝试基本的 helloworld 示例(https://developers.google.com/appengine/docs/python/gettingstartedpython27/helloworldHTTP Error 301: Moved Permanently
),并且每当我尝试使用 dev_appserver.py 测试我的代码时都会收到错误消息
我拥有的 2 个文件完全是从 developer.google.com 网站复制和粘贴的。我已经包含了 dev_appserver.py 在 PATH 和 PYTHONPATH 中的位置
我在 Linux 上使用 python 2.7.3 和 appengine v1.8.4 运行它
当我运行它时,终端上的输出是......
[verma@localhost python]$ dev_appserver.py helloworld/
WARNING 2013-09-11 04:45:49,988 api_server.py:327] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-09-11 04:45:49,999 api_server.py:138] Starting API server at: http://localhost:57128
INFO 2013-09-11 04:45:50,021 dispatcher.py:164] Starting module "default" running at: http://localhost:8080
INFO 2013-09-11 04:45:50,023 admin_server.py:117] Starting admin server at: http://localhost:8000
HTTPError()
HTTPError()
Traceback (most recent call last):
File "/home/verma/Documents/gae/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/verma/Documents/gae/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/verma/Documents/gae/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 256, in __call__
return app(environ, start_response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 97, in __call__
self._flush_logs(response.get('logs', []))
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 233, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/verma/Documents/gae/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib64/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 301: Moved Permanently
Traceback (most recent call last):
File "/home/verma/Documents/gae/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/verma/Documents/gae/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/verma/Documents/gae/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 256, in __call__
return app(environ, start_response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 97, in __call__
self._flush_logs(response.get('logs', []))
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 233, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/verma/Documents/gae/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/verma/Documents/gae/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/verma/Documents/gae/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib64/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 301: Moved Permanently
INFO 2013-09-11 04:46:01,635 module.py:593] default: "GET / HTTP/1.1" 500 -
我有一种感觉,我错过了一些非常基本的东西,但找不到。顺便说一句,这是几天前的工作,我不记得做过任何愚蠢的事情来打破这个:-(