Skip to content

python3.14 break command_line/run_server.py #632

Closed

Description

@pfpulux

Hi the update to python3.14 break the run_server.py with

  File "/home/void/.local/lib/python3.14/site-packages/lona/app.py", line 437, in _run
    run_server(
    ~~~~~~~~~~^
        args=server_args,
        ^^^^^^^^^^^^^^^^^
        server=self.server,
        ^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/void/.local/lib/python3.14/site-packages/lona/command_line/run_server.py", line 23, in run_server
    loop = asyncio.get_event_loop()
  File "/usr/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.

See also the python3.14 Changelog.

I looks like sed -i "s/get_event_loop/new_event_loop/" run_server.py will fix this, but I'm not have checkt for side-efects.

Activity

  1. fscherf commented on Jan 7, 2026

    @fscherf
    Member

    Thanks for reporting! We need to maintain compatibility with older versions though. I'll add a fix and a python 3.14 environment to the test suite.

  2. janheini commented on Apr 24, 2026

    @janheini
    Contributor

    We faced the same issue with Flamingo and it turned out to be a one line fix:
    pengutronix/flamingo#57

    I haven't looked at the code too closely but maybe the fix here is similar.

  3. fscherf commented on Apr 24, 2026

    @fscherf
    Member

    Currently we support for python versions up to 3.11. I looked into adding support up to 3.14 yesterday, and there are multiple smaller issues. No big road block as far as I can see so far. Working on it.

    @janheini will be the same story for flamingo I assume. Both projects were conceptualized around the same time.

  4. fscherf commented on Apr 26, 2026

    @fscherf
    Member

    @pfpulux can you please verify that #636 fixes your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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