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()