From 961ac0a7389c2cc44ea6411d583d2b0af6d9cde4 Mon Sep 17 00:00:00 2001 From: Rennylex <46737781+Rennylex@users.noreply.github.com> Date: Sat, 9 Apr 2022 20:22:18 +0800 Subject: [PATCH] Update model.rst Update Quickstart page with a necessary modification for JupyterLab users. --- docs/quickstart/model.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/quickstart/model.rst b/docs/quickstart/model.rst index f7858ceb8e..63795ee8ac 100644 --- a/docs/quickstart/model.rst +++ b/docs/quickstart/model.rst @@ -231,6 +231,17 @@ You may have noticed we're importing from ``dffml.noasync``. If you're using .. literalinclude:: /../examples/quickstart_async.py + +If you are running this on Jupyter (Jupyter Lab or Jupyter Notebook), you +might encounter the RuntimeError caused by the event loop started automatically +by Jupyter. To solve this problem, simply replace the last line of codes +.. code-block :: Python + asyncio.run(main()) + +with +.. code-block :: Python + await(main()) + HTTP ----