Skip to content

Commit

Permalink
Workaround for asyncio issue on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamrick committed Mar 25, 2021
1 parent 37e2746 commit 34404e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nbgrader/apps/nbgraderapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import sys
import os

import asyncio
from textwrap import dedent

from traitlets import default
Expand Down Expand Up @@ -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()

0 comments on commit 34404e3

Please sign in to comment.