我是使用python 2.7的GAE的新手,我只是想开始使用基础知识。所以我下载了一个应用程序,当我在线部署它时工作正常,但我无法在dev_appserver上本地运行应用程序。我也在代理服务器后面,所以我已经在env上设置了http_proxy。服务器正常启动,但是当我打开localhost:8080时,它会显示以下错误:
HTTPError()
HTTPError()
Traceback (most recent call last):
File "c:\Program Files (x86)\Google\google_appengine\lib\cherrypy\cherrypy\wsg
iserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "c:\Program Files (x86)\Google\google_appengine\lib\cherrypy\cherrypy\wsg
iserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "c:\Program Files (x86)\Google\google_appengine\lib\cherrypy\cherrypy\wsg
iserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
vappserver2\wsgi_server.py", line 269, in __call__
return app(environ, start_response)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
vappserver2\request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
vappserver2\python\request_handler.py", line 148, in __call__
self._flush_logs(response.get('logs', []))
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
vappserver2\python\request_handler.py", line 284, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\api\apip
roxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\api\apip
roxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\api\apip
roxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remo
te_api\remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remo
te_api\remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "c:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pengine_rpc.py", line 409, in Send
INFO 2014-03-10 17:40:07,645 module.py:612] default: "GET / HTTP/1.1" 500 -
f = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 410, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 448, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
}
答案 0 :(得分:0)
找到问题的解决方案。我在本地部署app引擎时设置了我的http_proxy环境变量。在本地测试时,需要禁用用于appcfg的代理设置。