Program failure while creating intensity map on macOS
There is a bug on macOS with up-to-date installation. During the generation of the intensity map, X-Socs fails. Error message is:
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
This patch seems to fix the issue with python from python.org and a small dataset:
xsocs/__main__.py
@@ -30,7 +30,12 @@ import logging
logging.basicConfig()
logging.getLogger('xsocs').setLevel(logging.INFO)
+import multiprocessing
import sys
+
+if sys.version_info.major >= 3 and sys.version_info.minor >= 4:
+ multiprocessing.set_start_method('spawn')
+
from silx.utils.launcher import Launcher
from xsocs import version
Yet it fails with anaconda3.