Skip to content

3.3.0 broken - switching from asyncio.get_event_loop() to asyncio.run() causing major issues #124

Open
@Zippy1999

Description

@Zippy1999

In version 3.2.0, calls to get the running event loop were executed with asyncio.get_event_loop / run_until_complete

In version 3.3.0 asyncio.run() has been used instead. This closes the running event loop after the code is executed.

When using this in lambda code which needs to run asyncio.get_event_loop it causes subsequent executions to fail

The failure errors:

ersions/3.11.9/lib/python3.11/asyncio/events.py", line 683, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'MainThread'.

The changed code is in __init__.py in the metric_scope decorator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions