Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2828912 + 2eae445 commit 12402f4Copy full SHA for 12402f4
1 file changed
lib/matplotlib/backends/backend_webagg.py
@@ -265,6 +265,14 @@ def random_ports(port, n):
265
266
@classmethod
267
def start(cls):
268
+ import asyncio
269
+ try:
270
+ asyncio.get_running_loop()
271
+ except RuntimeError:
272
+ pass
273
+ else:
274
+ cls.started = True
275
+
276
if cls.started:
277
return
278
@@ -306,8 +314,12 @@ def ipython_inline_display(figure):
306
314
import tornado.template
307
315
308
316
WebAggApplication.initialize()
309
- if not webagg_server_thread.is_alive():
310
- webagg_server_thread.start()
317
318
319
320
321
+ if not webagg_server_thread.is_alive():
322
+ webagg_server_thread.start()
311
323
312
324
fignum = figure.number
313
325
tpl = Path(core.FigureManagerWebAgg.get_static_file_path(),
0 commit comments