Message225719
| Author |
Michael.McAuliffe |
| Recipients |
Michael.McAuliffe |
| Date |
2014年08月23日.00:38:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1408754338.93.0.431000117242.issue22255@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|