Skip to content

asyncio.get_event_loop().close() requires Pythonista 3 reboot #43

@cclauss

Description

@cclauss

https://forum.omz-software.com/topic/3240/asyncio-doesn-t-work-in-pythonista-3

loop = asyncio.get_event_loop()
loop.close()  # this will throw a RuntimeError on subsequent runs until Pythonista 3 is rebooted

RuntimeError: There is no current event loop in thread xxx

Workaround: Don't call loop.close()
@jsbain workaround: loop = asyncio.get_event_loop_policy().new_event_loop()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions