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.

Author Michael.Olson
Recipients Michael.Olson
Date 2010-10-16.22:41:50
SpamBayes Score 1.3105453e-07
Marked as misclassified No
Message-id <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za>
In-reply-to
Content
In an application with an entry point of __main__.py, multiprocessing.Pool throws the following:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Dev\Python27\lib\multiprocessing\forking.py", line 346, in main
    prepare(preparation_data)
  File "D:\Dev\Python27\lib\multiprocessing\forking.py", line 454, in prepare
    assert main_name not in sys.modules, main_name
AssertionError: __main__

These messages repeat as long as the application is running.

Demonstration Code, must be in file named __main__.py:
--------------------
import multiprocessing
import time

if __name__ == '__main__':
    pool = multiprocessing.Pool()
    time.sleep(2)
--------------------
History
Date User Action Args
2010-10-16 22:41:53Michael.Olsonsetrecipients: + Michael.Olson
2010-10-16 22:41:53Michael.Olsonsetmessageid: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za>
2010-10-16 22:41:50Michael.Olsonlinkissue10128 messages
2010-10-16 22:41:50Michael.Olsoncreate