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

Event loop is not closed properly after running pytest #6

Closed
dolamroth opened this issue Apr 30, 2022 · 3 comments
Closed

Event loop is not closed properly after running pytest #6

dolamroth opened this issue Apr 30, 2022 · 3 comments

Comments

@dolamroth
Copy link
Collaborator

dolamroth commented Apr 30, 2022

RuntimeError is raised after successfully running all tests

Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001E005AB7DC0>
Traceback (most recent call last):
  File "...\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "...\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "...\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
  File "...\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
@DmitryBurnaev
Copy link
Owner

It seems like local problem. I can't reproduce this kind of error(
Could you please try to run tests inside the docker container? Something like:

  1. cp .env.local .env
  2. provide env variables in .env file
  3. run tests
docker image build -t starlette-web . && docker run -ti --env-file .env --rm starlette-web

@dolamroth
Copy link
Collaborator Author

It is Windows-specific error pytest-dev/pytest-asyncio#371
I'll try to deal with it later

@dolamroth
Copy link
Collaborator Author

Solved in #54

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