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

RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio() #220

Closed
PadraigEire opened this issue May 4, 2022 · 3 comments

Comments

@PadraigEire
Copy link

$ uname -a Linux debian 5.10.0-12-amd64 #1 SMP Debian 5.10.103-1 (2022-03-07) x86_64 GNU/Linux

$ ./gs-server Traceback (most recent call last): File "./gs-server", line 3, in <module> from libgrabsite import server File "/home/padraig/gs-venv/lib/python3.8/site-packages/libgrabsite/server.py", line 7, in <module> from autobahn.asyncio.websocket import WebSocketServerFactory, WebSocketServerProtocol File "/home/padraig/gs-venv/lib/python3.8/site-packages/autobahn/asyncio/__init__.py", line 32, in <module> from autobahn.asyncio.websocket import \ File "/home/padraig/gs-venv/lib/python3.8/site-packages/autobahn/asyncio/websocket.py", line 36, in <module> from autobahn.wamp import websocket File "/home/padraig/gs-venv/lib/python3.8/site-packages/autobahn/wamp/websocket.py", line 32, in <module> from autobahn.websocket import protocol File "/home/padraig/gs-venv/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 2533, in <module> class WebSocketServerProtocol(WebSocketProtocol): File "/home/padraig/gs-venv/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 2538, in WebSocketServerProtocol log = txaio.make_logger() File "/home/padraig/gs-venv/lib/python3.8/site-packages/txaio/_unframework.py", line 41, in _throw_usage_error raise RuntimeError( RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio()

@ivan
Copy link
Contributor

ivan commented May 4, 2022

Thanks for the report. I have managed to reproduce this on Debian and I will take a look at fixing it soon.

Traceback (most recent call last):
  File "/home/at/gs-venv/bin/gs-server", line 3, in <module>
    from libgrabsite import server
  File "/home/at/gs-venv/lib/python3.8/site-packages/libgrabsite/server.py", line 7, in <module>
    from autobahn.asyncio.websocket import WebSocketServerFactory, WebSocketServerProtocol
  File "/home/at/gs-venv/lib/python3.8/site-packages/autobahn/asyncio/__init__.py", line 32, in <module>
    from autobahn.asyncio.websocket import \
  File "/home/at/gs-venv/lib/python3.8/site-packages/autobahn/asyncio/websocket.py", line 36, in <module>
    from autobahn.wamp import websocket
  File "/home/at/gs-venv/lib/python3.8/site-packages/autobahn/wamp/websocket.py", line 32, in <module>
    from autobahn.websocket import protocol
  File "/home/at/gs-venv/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 2533, in <module>
    class WebSocketServerProtocol(WebSocketProtocol):
  File "/home/at/gs-venv/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 2538, in WebSocketServerProtocol
    log = txaio.make_logger()
  File "/home/at/gs-venv/lib/python3.8/site-packages/txaio/_unframework.py", line 41, in _throw_usage_error
    raise RuntimeError(
RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio()

@ivan ivan closed this as completed in 4f2526d May 4, 2022
@ivan
Copy link
Contributor

ivan commented May 4, 2022

Could you please run

~/gs-venv/bin/pip install --no-binary lxml --upgrade git+https://github.com/ArchiveTeam/grab-site

again and let me know if gs-server is fixed now?

@PadraigEire
Copy link
Author

That seems to have fixed it, thanks.

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