我们正在使用以下Google文档将Google Cloud Endpoint v1迁移到v2。
https://cloud.google.com/endpoints/docs/frameworks/python/migrating
在部署迁移版本后,出现以下错误。
“ RuntimeError:任务小程序不应产生纯值”
这里是完整的追溯。
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 267, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 1108, in add_context_wrapper
return synctaskletfunc(*args, **kwds)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 1087, in synctasklet_wrapper
return taskletfunc(*args, **kwds).get_result()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 383, in get_result
self.check_success()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 378, in check_success
self.wait()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 362, in wait
if not ev.run1():
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/eventloop.py", line 268, in run1
delay = self.run0()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/eventloop.py", line 230, in run0
callback(*args, **kwds)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7894e0c59273b2b7/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 509, in _help_tasklet_along
'%.200s yielded %.200r' % (info, value))
RuntimeError: A tasklet should not yield a plain value: initial generator __call__(endpoints_dispatcher.py:128) yielded '{\n "auth": {\n "oauth2": {\n "scopes": {}\n }\n },\n "basePath": "<APINAME>",\n "baseUrl": "https://<<PROJECTNAME>>.appspot.com/<APINAME>",\n "batchPath": "batch"
我已经尝试过一些尝试,例如,我知道某些尝试虽然不合逻辑,但尽管尝试过。
是否有人遇到类似问题请帮助我。
答案 0 :(得分:4)
这是由于ndb库与WSGI规范不兼容引起的。您应该将此报告给该库的支持团队。