Describe the bug
Running a Chainlit app on Python 3.14 crashes on every request that serves a static file
(including the initial page load) with anyio.NoEventLoopError: Not currently running on any asynchronous event loop. Available async backends: asyncio, trio. The error originates
from starlette/responses.py calling anyio.to_thread.run_sync(os.stat, self.path).
To Reproduce
- Create a fresh virtual environment with Python 3.14
pip install chainlit
chainlit run app.py
- Open http://localhost:8000 in a browser
- See repeated
anyio.NoEventLoopError tracebacks in the terminal
Screenshots
**Desktop **
- OS: Linux Fedora
- Browser Chrome
- Python version : 3.14.6
chainlit version: 2.11.0
Additional context
This looks like a duplicate of #2767 — same traceback and root cause. Downgrading to
Python 3.12/3.13 in a fresh venv works around it.
Describe the bug
Running a Chainlit app on Python 3.14 crashes on every request that serves a static file
(including the initial page load) with
anyio.NoEventLoopError: Not currently running on any asynchronous event loop. Available async backends: asyncio, trio. The error originatesfrom
starlette/responses.pycallinganyio.to_thread.run_sync(os.stat, self.path).To Reproduce
pip install chainlitchainlit run app.pyanyio.NoEventLoopErrortracebacks in the terminalScreenshots
**Desktop **
chainlit version: 2.11.0
Additional context
This looks like a duplicate of #2767 — same traceback and root cause. Downgrading to
Python 3.12/3.13 in a fresh venv works around it.