igortg/pytest-async-sqlalchemy

"RuntimeError: Event loop is closed"

enchance opened this issue · 1 comments

This is a great package you got here. My tests run as expected but at the end I'm getting the following error:

Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x7efcf5b9d820>
transport: <_SelectorSocketTransport closing fd=10>
Traceback (most recent call last):
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/selector_events.py", line 918, in write
    n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/sslproto.py", line 684, in _process_write_backlog
    self._transport.write(chunk)
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/selector_events.py", line 924, in write
    self._fatal_error(exc, 'Fatal write error on socket transport')
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/selector_events.py", line 719, in _fatal_error
    self._force_close(exc)
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/selector_events.py", line 731, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/base_events.py", line 746, in call_soon
    self._check_closed()
  File "/home/enchance/.pyenv/versions/3.9.10/lib/python3.9/asyncio/base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Did I forget to do something?

did you read this?

Make sure you join the larger discussion here.