File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,14 @@ def random_ports(port, n):
245
245
246
246
@classmethod
247
247
def start (cls ):
248
+ try :
249
+ import asyncio
250
+ asyncio .get_running_loop ()
251
+ except :
252
+ pass
253
+ else :
254
+ cls .started = True
255
+
248
256
if cls .started :
249
257
return
250
258
@@ -283,11 +291,16 @@ def catch_sigint():
283
291
284
292
285
293
def ipython_inline_display (figure ):
294
+
286
295
import tornado .template
287
296
288
297
WebAggApplication .initialize ()
289
- if not webagg_server_thread .is_alive ():
290
- webagg_server_thread .start ()
298
+ try :
299
+ import asyncio
300
+ asyncio .get_running_loop ()
301
+ except :
302
+ if not webagg_server_thread .is_alive ():
303
+ webagg_server_thread .start ()
291
304
292
305
fignum = figure .number
293
306
tpl = Path (core .FigureManagerWebAgg .get_static_file_path (),
You can’t perform that action at this time.
0 commit comments