Skip to content

Internal Compiler Error: Unhandled exception #2312

Closed
@davidbrochart

Description

@davidbrochart

It seems asyncio is not supported yet? I get the following error while importing it:

semantic error: Could not find the module 'asyncio'. If an import path is available, please use the `-I` option to specify it

As a workaround, I wanted to try this simple coroutine runner:

async def main():
    print("done")

def run_async_fn(async_fn, *args, **kwargs):
    coro = async_fn(*args, **kwargs)
    try:
        coro.send(None)
    except StopIteration as exc:
        return exc.value
    else:
        raise RuntimeError("Cannot run async function")

run_async_fn(main)

But I get:

Internal Compiler Error: Unhandled exception

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions