From 5b592d933f1ef40c0e164ac806e1461863199b18 Mon Sep 17 00:00:00 2001 From: SuperLanceur Date: Sat, 21 Sep 2024 21:46:05 +0200 Subject: [PATCH] Fix asyncio (aiodns) error --- moodle_dl/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moodle_dl/main.py b/moodle_dl/main.py index 77d3ba1..5fd56df 100755 --- a/moodle_dl/main.py +++ b/moodle_dl/main.py @@ -535,6 +535,8 @@ def post_process_opts(opts: MoodleDlOpts): # --- called at the program invocation: ------------------------------------- def main(args=None): + if sys.platform == "win32": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) just_fix_windows_console() opts = post_process_opts(MoodleDlOpts(**vars(get_parser().parse_args(args)))) setup_logger(opts)