Duplicate Check
Describe the bug
Python version: 3.13.5.
Environment: Spyder 6.0.7
I recently discovered this library and have installed it in a virtual environment. However when I run the example code I get "RuntimeError: asyncio.run() cannot be called from a running event loop" I must warn that I am working in Spyder Environment (winpython)
DJuego
Code sample
Code
import flet as ft
def main(page: ft.Page):
page.title = "Flet counter example"
page.vertical_alignment = ft.MainAxisAlignment.CENTER
txt_number = ft.TextField(value="0", text_align=ft.TextAlign.RIGHT, width=100)
def minus_click(e):
txt_number.value = str(int(txt_number.value) - 1)
page.update()
def plus_click(e):
txt_number.value = str(int(txt_number.value) + 1)
page.update()
page.add(
ft.Row(
[
ft.IconButton(ft.Icons.REMOVE, on_click=minus_click),
txt_number,
ft.IconButton(ft.Icons.ADD, on_click=plus_click),
],
alignment=ft.alignment.center,
)
)
ft.app(main)
To reproduce
+Python version: 3.13.5.
+Environment: Spyder 6.0.7
+pip install flet
Run the sample code
Expected behavior
Display the example interface of flet.
Screenshots / Videos
Operating System
Windows 10 x64
Operating system details
Flet version
Version: 0.28.3
Regression
No, it isn't
Suggestions
No response
Logs
Logs
Additional details
No response
Duplicate Check
Describe the bug
Python version: 3.13.5.
Environment: Spyder 6.0.7
I recently discovered this library and have installed it in a virtual environment. However when I run the example code I get "RuntimeError: asyncio.run() cannot be called from a running event loop" I must warn that I am working in Spyder Environment (winpython)
DJuego
Code sample
Code
To reproduce
+Python version: 3.13.5.
+Environment: Spyder 6.0.7
+pip install flet
Run the sample code
Expected behavior
Display the example interface of flet.
Screenshots / Videos
Operating System
Windows 10 x64
Operating system details
Flet version
Version: 0.28.3
Regression
No, it isn't
Suggestions
No response
Logs
Logs
[Paste your logs here]Additional details
No response