Я сталкиваюсь с ошибкой 404 (в консоли) и ошибкой 500 (в браузере), когда просто пытаюсь запустить это руководство по AppEngine
https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env
Я следовал всему руководству, копируя последние файлы из github, и пытаюсь запустить его в локальной среде.
dev_appserver.py --port=8080 --enable_console=yes app.yaml
Когда я пытаюсь перейти к http://localhost:8080
В консоли я получаю
HTTPError()
HTTPError()
Traceback (most recent call last):
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\wsgi_server.py", line 292, in __call__
return app(environ, start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\request_rewriter.py", line 314, in _rewriter_m
iddleware
response_body = iter(application(environ, wrapped_start_response))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 165,
in __call__
self._flush_logs(response.get('logs', []))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 308,
in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 97, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 331, in MakeSyncCall
rpc.CheckSuccess()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 136, in CheckSuccess
self._traceback)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 161, in _WaitImpl
self.request, self.response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 223, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 248, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 485, in Send
self._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 631, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 369, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 308, in _GetAuthToken
response = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
INFO 2019-04-18 09:56:39,905 module.py:861] default: "GET /form HTTP/1.1" 50
0 -
Traceback (most recent call last):
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\wsgi_server.py", line 292, in __call__
return app(environ, start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\request_rewriter.py", line 314, in _rewriter_m
iddleware
response_body = iter(application(environ, wrapped_start_response))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 165,
in __call__
self._flush_logs(response.get('logs', []))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 308,
in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 97, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 331, in MakeSyncCall
rpc.CheckSuccess()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 136, in CheckSuccess
self._traceback)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 161, in _WaitImpl
self.request, self.response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 223, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 248, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 485, in Send
self._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 631, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 369, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 308, in _GetAuthToken
response = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
В браузере я получаю
localhost is currently unable to handle this request.
HTTP ERROR 500
Я нашел несколько сообщений с похожими симптомами, но не точными. И ни одно из предложенных решений не устранило проблему.
Пробовал:
- Указание порта 8080 в dev_appserver.
- Обеспечение ASP.NET Framework был установлен.
- Включение IIS.
- Обеспечение того, чтобы SDK был последней версией.
Это также прямо из учебника Google.
У кого-нибудь есть идеи или идеи?