ArchiveTeam / grab-site

The archivist's web crawler: WARC output, dashboard for all crawls, dynamic ignore patterns
Other
1.31k stars 129 forks source link

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

Closed PadraigEire closed 2 years ago

PadraigEire commented 2 years ago

$ 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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

That seems to have fixed it, thanks.