From a794ebeb028f7ef287c780d3890f816db9c21c51 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Tue, 15 Aug 2023 18:03:45 -0700 Subject: [PATCH] More actionable error message when spawn is incorrectly used. (#102203) Co-authored-by: Yuxin Wu Co-authored-by: Oleg Iarygin --- Lib/multiprocessing/spawn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py index f1af7709104714..daac1ecc34b55e 100644 --- a/Lib/multiprocessing/spawn.py +++ b/Lib/multiprocessing/spawn.py @@ -150,7 +150,11 @@ def _check_not_importing_main(): ... The "freeze_support()" line can be omitted if the program - is not going to be frozen to produce an executable.''') + is not going to be frozen to produce an executable. + + To fix this issue, refer to the "Safe importing of main module" + section in https://docs.python.org/3/library/multiprocessing.html + ''') def get_preparation_data(name):