Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'asynchronous' decorator not supported from Tornado 6.0 #24

Open
benheartland opened this issue Oct 20, 2021 · 1 comment
Open

'asynchronous' decorator not supported from Tornado 6.0 #24

benheartland opened this issue Oct 20, 2021 · 1 comment

Comments

@benheartland
Copy link

benheartland commented Oct 20, 2021

https://github.com/moddevices/mod-sdk/blob/21a80729dde1439dcea03bfafbc42981fb503d8a/modsdk/webserver.py#L496

As noted in the release notes for Tornado 5.1.0 "The asynchronous decorator is deprecated and will be removed in 6.0." for tornado.web

Workaround: install Tornado 5.1.1 instead of the latest version (requires using pip rather than apt-get)

Output from running modsdk with Tornado 6.1 installed:

ben@207522396b28:/$ modsdk
Using raw lilv for plugin info (without checks)
Traceback (most recent call last):
  File "/usr/local/bin/modsdk", line 33, in <module>
    sys.exit(load_entry_point('modsdk==2.0.0', 'console_scripts', 'modsdk')())
  File "/usr/local/bin/modsdk", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/local/lib/python3.9/dist-packages/modsdk/webserver.py", line 495, in <module>
    class Screenshot(JsonRequestHandler):
  File "/usr/local/lib/python3.9/dist-packages/modsdk/webserver.py", line 496, in Screenshot
    @web.asynchronous
AttributeError: module 'tornado.web' has no attribute 'asynchronous'
@brummer10
Copy link

#11
provide a patch to make it work with tornado > 5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants