From 34404e3c4ab0ba6410d52e4e02f67b75c3901689 Mon Sep 17 00:00:00 2001 From: "Jessica B. Hamrick" Date: Thu, 25 Mar 2021 22:05:53 +0000 Subject: [PATCH] Workaround for asyncio issue on windows --- nbgrader/apps/nbgraderapp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nbgrader/apps/nbgraderapp.py b/nbgrader/apps/nbgraderapp.py index ba648fd7b..38696a238 100755 --- a/nbgrader/apps/nbgraderapp.py +++ b/nbgrader/apps/nbgraderapp.py @@ -4,6 +4,7 @@ import sys import os +import asyncio from textwrap import dedent from traitlets import default @@ -327,4 +328,8 @@ def print_version(self): def main(): + # See https://bugs.python.org/issue37373 :( + # Workaround from https://github.com/jupyter/nbconvert/issues/1372 + if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith('win'): + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) NbGraderApp.launch_instance()