Error2 reports
Fix RuntimeError
in Panel
✅ Solution
The "RuntimeError: no running event loop" in Panel often arises when asynchronous operations (like callbacks) are initiated outside of a running `asyncio` event loop, particularly after reloading or during multi-threaded execution. Ensure all Panel apps and their asynchronous callbacks are initialized and executed within the main thread's event loop by using `panel.serve` or `panel.show` correctly, and avoid creating new loops within threads or reload contexts. If running asynchronous code outside the main thread, explicitly set the default event loop using `asyncio.set_event_loop` within that thread.
Related Issues
Real GitHub issues where developers encountered this error:
Timeline
First reported:Jun 24, 2025
Last reported:Aug 17, 2025