1

Python用のGoogle App Engine SDK 1.8.6を使用していますが、localhostで正常に動作します。しかし最近、Google が SDK 1.8.7 に切り替えたため、アプリが正しく動作しません。ローカルでは HTTPError が発生します:HTTP Error 403: Forbidden

appspot.com で以前のバージョンを使用する方法はありますか?

これは、SDK 1.8.7 のスタック トレースです
(注) SDK 1.8.6 を使用すると、同じアプリが正常に動作します。

URLError(error(2, 'No such file or directory'),)
URLError(error(2, 'No such file or directory'),)
Traceback (most recent call last):
  File "/home/rocker/CloudAppGCDC/sdk/gg/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
    req.respond()
  File "/home/rocker/CloudAppGCDC/sdk/gg/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
    self.server.gateway(self).respond()
INFO     2013-11-09 06:30:25,630 module.py:608] default: "GET / HTTP/1.1" 500 -
  File "/home/rocker/CloudAppGCDC/sdk/gg/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/wsgi_server.py", line 269, in __call__
    return app(environ, start_response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
    response_body = iter(application(environ, wrapped_start_response))
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/python/request_handler.py", line 97, in __call__
    self._flush_logs(response.get('logs', []))
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/python/request_handler.py", line 233, in _flush_logs
    apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
    rpc.CheckSuccess()
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
    self.request, self.response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
    encoded_response = self._server.Send(self._path, encoded_request)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/appengine_rpc.py", line 409, in Send
    f = self.opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 2] No such file or directory>
Traceback (most recent call last):
  File "/home/rocker/CloudAppGCDC/sdk/gg/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
    req.respond()
  File "/home/rocker/CloudAppGCDC/sdk/gg/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
    self.server.gateway(self).respond()
  File "/home/rocker/CloudAppGCDC/sdk/gg/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/wsgi_server.py", line 269, in __call__
    return app(environ, start_response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
    response_body = iter(application(environ, wrapped_start_response))
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/python/request_handler.py", line 97, in __call__
    self._flush_logs(response.get('logs', []))
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/devappserver2/python/request_handler.py", line 233, in _flush_logs
    apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
    rpc.CheckSuccess()
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
    self.request, self.response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
    encoded_response = self._server.Send(self._path, encoded_request)
  File "/home/rocker/CloudAppGCDC/sdk/gg/google/appengine/tools/appengine_rpc.py", line 409, in Send
    f = self.opener.open(req)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 2] No such file or directory>

SDK 1.8.7ではなくSDK 1.8.6で動作する理由がわかりません。

4

2 に答える 2

1

いいえ、仕方がありません。本番環境のランタイムは Google によってアップグレードされ、ユーザーはまったく制御できません。

于 2013-11-09T04:11:38.430 に答える
0

HTTP エラーは、アプリが 経由でアクセスしようとしているサイトから渡されますurlfetch。これは、ほとんどの場合、SDK の更新とは関係ありません。

そうでないと思われる場合は、スタックトレース、使用しているコード、およびアクセスしようとしているサイトをご提示ください。

于 2013-11-09T06:14:55.243 に答える