A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Fix mpl interactive - remove asyncio.run (#981)
Akshay Agrawaleea66488d0ab
diff --git a/marimo/_plugins/stateless/mpl/_mpl.py b/marimo/_plugins/stateless/mpl/_mpl.pyindex e16c4ff669..46f598b5a3 100644--- a/marimo/_plugins/stateless/mpl/_mpl.py+++ b/marimo/_plugins/stateless/mpl/_mpl.py@@ -13,6 +13,7 @@ import ioimport mimetypesimport signalimport threading+import timefrom pathlib import Pathfrom typing import TYPE_CHECKING, Any, Optional, Tuple@@ -210,9 +211,9 @@ def get_or_create_application() -> Starlette:threading.Thread(target=start_server).start()- # arbitrary wait 100ms for the server to start+ # arbitrary wait 200ms for the server to start# this only happens once per session- asyncio.run(asyncio.sleep(0.02))+ time.sleep(0.02)return _app