This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: cx_freeze multiprocessing bug
Type: Stage:
Components: Tkinter Versions: Python 3.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: davin, shivani, torsten
Priority: normal Keywords:

Created on 2014-05-14 06:08 by shivani, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg218503 - (view) Author: Shivani (shivani) Date: 2014-05-14 06:08
Hey all,
I have problem with multiprocessing and cx_freeze..
I am freezing my UI application.

i have a line in code::->

"multiprocessing.set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))"

when a commented out this line, my UI keeps iterating again and again.
and when i uncomment it, without throwing any error,UI just stuck in its second phase.

and moreover spoiling my unfreezen code olso.

What can be the problem with multi processing and cx_freeze relation..?

Thanks in Advance.
msg219180 - (view) Author: Torsten Landschoff (torsten) * Date: 2014-05-26 21:28
That sounds like you did not initialize the freeze support of the multiprocessing module:

https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support

Basically, you need to add the following code to your main, before anything else:

    from multiprocessing import freeze_support
    freeze_support()

Interestingly, the documentation states that starting a new Process instance without freeze_support will raise a RuntimeError. Maybe the detection of that situation failed in your case?
msg237542 - (view) Author: Davin Potts (davin) * (Python committer) Date: 2015-03-08 15:51
Can the OP provide a runnable example to help us understand what they are actually trying to do?

There is simply not enough information for us to go on here -- Torsten's suggestion is a good one but we need more information to help any further.
msg250136 - (view) Author: Davin Potts (davin) * (Python committer) Date: 2015-09-07 22:56
Closing as there is no additional information forthcoming from the OP and per the prior comments, Torsten's suggestion seems as helpful as anything that can be offered without more info.
History
Date User Action Args
2022-04-11 14:58:03adminsetgithub: 65704
2015-09-07 22:56:55davinsetstatus: pending -> closed
resolution: out of date
messages: + msg250136
2015-03-08 15:51:29davinsetstatus: open -> pending
nosy: + davin
messages: + msg237542

2014-05-26 21:28:06torstensetnosy: + torsten
messages: + msg219180
2014-05-14 06:08:34shivanicreate