Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

asyncio internals throwRuntimeError: Event loop is closed on script exit #92841

Closed
Labels
@arhadthedev

Description

@arhadthedev

Actual behavior

>>>importasyncio>>>importaiohttp>>>>>>asyncdefmain():...asyncwithaiohttp.ClientSession()assession:...asyncwithsession.get('https://example.com/'):...pass...>>>asyncio.run(main())>>>exit()Exceptionignoredin:<function_ProactorBasePipeTransport.__del__at0x0000017BF133F760>Traceback (mostrecentcalllast):File"C:\Program Files\Python310\lib\asyncio\proactor_events.py",line116,in__del__self.close()File"C:\Program Files\Python310\lib\asyncio\proactor_events.py",line108,incloseself._loop.call_soon(self._call_connection_lost,None)File"C:\Program Files\Python310\lib\asyncio\base_events.py",line750,incall_soonself._check_closed()File"C:\Program Files\Python310\lib\asyncio\base_events.py",line515,in_check_closedraiseRuntimeError('Event loop is closed')RuntimeError:Eventloopisclosed

This issue was reported inaio-libs/aiohttp#4324 so the reproducer is copied from there.

Expected behavior

Normal exit without termination. There is no user-created loop to be closed manually.

Your environment

  • CPython versions tested on: 3.10.4
  • Operating system and architecture: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp