You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute
result = yield result
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
yielded = next(result)
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado_json/schema.py", line 193, in _wrapper
self.success(output)
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado_json/jsend.py", line 20, in success
self.write({'status': 'success', 'data': data})
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado/web.py", line 746, in write
chunk = escape.json_encode(chunk)
File "/home/.virtualenvs/annotation_tool/lib/python3.6/site-packages/tornado/escape.py", line 81, in json_encode
return json.dumps(value).replace("</", "<\\/")
File "/usr/lib/python3.6/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'coroutine' is not JSON serializable
Tested with python 3.6
The text was updated successfully, but these errors were encountered:
Hey folks, looks like this is a breaking change in Tornado 6.x. For the time being, I have created a new release (1.3.4) that pins a working set of dependencies so the project continues to behave as it has before.
I don't have time to look into updating Tornado-JSON to support Tornado 6.x at the moment, but I welcome PRs in case anyone is interested in adding support.
hfaran
changed the title
async handler methods not supported
async handler methods not supported (Tornado 6.x)
Apr 17, 2019
A serialization exception is thrown if a handler is
async
instead of decorated with@coroutine
Example:
Thrown error:
Tested with python 3.6
The text was updated successfully, but these errors were encountered: