Skip to content

Fails to run on python 3.14 or 3.13 on Windows #180

@Orthosilicate

Description

@Orthosilicate

Steps to reproduce,

  1. Install Python 3.14 on Windows 11
  2. Run Example from this page
import asyncio
import tkinter as tk

from async_tkinter_loop import async_handler, async_mainloop


async def counter():
    i = 0
    while True:
        i += 1
        label.config(text=str(i))
        await asyncio.sleep(1.0)


root = tk.Tk()

label = tk.Label(root)
label.pack()

tk.Button(root, text="Start", command=async_handler(counter)).pack()

async_mainloop(root)

Error Resulting

  File "C:\Users\User\AppData\Local\Programs\Python\Python314\Lib\site-packages\async_tkinter_loop\async_tkinter_loop.py", line 39, in get_event_loop
    return asyncio.get_running_loop()
           ~~~~~~~~~~~~~~~~~~~~~~~~^^
RuntimeError: no running event loop

This error does not occur on 3.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions