Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Event loop is closed in v0.21 #2848

Closed
yunguangli opened this issue Mar 11, 2024 · 3 comments
Closed

RuntimeError: Event loop is closed in v0.21 #2848

yunguangli opened this issue Mar 11, 2024 · 3 comments

Comments

@yunguangli
Copy link

Description
Under Flet 0.21.1, I tested the ResponsiveRow example in the documentation. There as not problem when the program was running. The problem was at when I closed the program. There were a lot of error messages in the console. This doesn't happen in Flet 0.20.2 and prior.

Code example to reproduce the issue:

Use the ResponsiveRow example in the documentation

Describe the results you received:
There are error messages when I closed the program.

Exception ignored in: <function StreamWriter.del at 0x000001DE7C9744A0>
Traceback (most recent call last):
File "C:\AppData\Local\Programs\Python\Python312\Lib\asyncio\streams.py", line 397, in del
self.close()
File "C:\AppData\Local\Programs\Python\Python312\Lib\asyncio\streams.py", line 343, in close
return self._transport.close()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AppData\Local\Programs\Python\Python312\Lib\asyncio\proactor_events.py", line 109, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 772, in call_soon
self._check_closed()
File "C:\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Flet version (pip show flet):
0.21.1

(paste your output here)

Give your requirements.txt file (don't pip freeze, instead give direct packages):

(The requirements)

Operating system:
Windows 11
Python 3.12.0

Additional environment details:

@ndonkoHenri
Copy link
Collaborator

Did you happen to resolve this?

@yunguangli
Copy link
Author

No. I haven't resolve this. This only happens in my company Windows PC , which is more restricted with network security , etc. It doesn't happen in my home laptop. And only happened in Flet 0.21 and above. 0.20.2 below has no problem in my company pc. So I want to investigate more before I repost the issue again.

@ndonkoHenri
Copy link
Collaborator

ndonkoHenri commented Mar 11, 2024

As reference, here is the issue: python/cpython#109538
As mentioned by Guido here, the issue has already been fixed,and only the latest python versions should have this fix.
Here is the list of python releases: https://www.python.org/downloads/
I suggest you get one released from 2024 - at the time I am writing either 3.11.8 or 3.12.2.

Your feedback will be helpful to others...

@ndonkoHenri ndonkoHenri changed the title ResponsiveRow example output a lot of errors on close in Flet 0.21.1 RuntimeError: Event loop is closed in v0.21 Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants