Message225719
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. |
|
Date |
User |
Action |
Args |
2014-08-23 00:38:58 | Michael.McAuliffe | set | recipients:
+ Michael.McAuliffe |
2014-08-23 00:38:58 | Michael.McAuliffe | set | messageid: <1408754338.93.0.431000117242.issue22255@psf.upfronthosting.co.za> |
2014-08-23 00:38:58 | Michael.McAuliffe | link | issue22255 messages |
2014-08-23 00:38:58 | Michael.McAuliffe | create | |
|