New submission from Michael McAuliffe: On Windows, I froze a script that uses multiprocessing with cx-freeze and Python 3.4.1 that had freeze_support() in the "if __name__ == '__main__'" section of the main module, and the resulting executable crashes with a RuntimeError 'context has already been set'.
The error happens in a call to set_start_method in multiprocessing.spawn's prepare function, and changing the line in spawn.py from: if 'start_method' in data: set_start_method(data['start_method']) to: if 'start_method' in data: set_start_method(data['start_method'], force = True) allows the frozen executable to successfully run. ---------- components: Library (Lib) messages: 225719 nosy: Michael.McAuliffe priority: normal severity: normal status: open title: Multiprocessing freeze_support raises RuntimeError type: crash versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22255> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com