1

PythonアプリケーションをApp Engine Standard EnvironmentからApp Engine Flexible環境に移植しようとしています。 the directions in the App Engine documentationに続いて、私が示したように、「のpython-compatの」モードを使用するために私のapp.yamlファイルを変更しました:App Engineへの移植後のデータストアRPCFailedErrorフレキシブル環境

service: default 
runtime: python-compat 
api_version: 1 
vm: true 
threadsafe: true 
instance_class: F2 

inbound_services: 
- warmup 

builtins: 
- remote_api: on 

env_variables: 
    GCLOUD_PROJECT: the-name-of-my-project 

展開すると、任意の試みは(NDB APIを使用して)アプリケーションからデータストアにコールします次のトラックバックが表示されます(切り捨てられます)。

File "/env/local/lib/python2.7/site-packages/google/appengine/datastore/datastore_rpc.py" in check_rpc_success 
    1371.  rpc.check_success() 
File "/env/local/lib/python2.7/site-packages/google/appengine/api/apiproxy_stub_map.py" in check_success 
    579.  self.__rpc.CheckSuccess() 
File "/env/local/lib/python2.7/site-packages/google/appengine/ext/vmruntime/vmstub.py" in _WaitImpl 
    312.   raise self._ErrorException(*_DEFAULT_EXCEPTION) 

Exception Type: RPCFailedError at /volume-list/ 
Exception Value: The remote RPC to the application server failed for call datastore_v3.RunQuery(). 

問題は何ですか? App Engineのドキュメントには、Python-compatランタイムでNDBを設定する特別な指示はありません。

答えて

1

今週はこのバグに出会ったばかりですが、デバッグしてApp Engineのサポートを受けて、答えが見つかりました。

は私SO answer here for more details参照してください、または単にappengine_config.pyに次のコードを追加します。

try: 
    import appengine.ext.vmruntime.vmstub as vmstub 
except ImportError: 
    pass 
else: 
    if isinstance(vmstub.DEFAULT_TIMEOUT, (int, long)): 
     # Newer requests libraries do not accept integers as header values. 
     # Be sure to convert the header value before sending. 
     # See Support Case ID 11235929. 
     vmstub.DEFAULT_TIMEOUT = bytes(vmstub.DEFAULT_TIMEOUT) 
+0

は今、素晴らしい作品。ありがとうございました! –

関連する問題