我们正在使用以下Google文档将Google云端点v1迁移到v2。
https://cloud.google.com/endpoints/docs/frameworks/python/migrating
部署迁移版本后获得以下错误。
“RuntimeError:一个tasklet不应该产生一个普通的值”
这是完整的追溯。
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"
我已经尝试了一些类似的东西,我知道有些尝试不符合逻辑,但尝试过。
任何人都面临类似的问题请帮助我。
这是由于ndb库与WSGI规范不兼容引起的。 您应该将此报告给该库的支持团队。