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 terry.reedy
Recipients Aaron Halfaker, davin, jnoller, sbt, terry.reedy
Date 2016-02-12.23:16:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455319013.63.0.382743574906.issue26333@psf.upfronthosting.co.za>
In-reply-to
Content
If you add the "if __name__ == '__main__':" guard after defining the target function, as specified in the multiprocessing doc, you will get a traceback much as you expect:

Traceback (most recent call last):
  File "F:\Python\mypy\tem.py", line 12, in <module>
    for new_val in pool.imap(add_one, value_iter):
  File "C:\Programs\Python35\lib\multiprocessing\pool.py", line 695, in next
    raise value
  File "C:\Programs\Python35\lib\multiprocessing\pool.py", line 380, in _handle_tasks
    for i, task in enumerate(taskseq):
  File "C:\Programs\Python35\lib\multiprocessing\pool.py", line 286, in <genexpr>
    self._taskqueue.put((((result._job, i, func, (x,), {})
  File "F:\Python\mypy\tem.py", line 10, in <genexpr>
    value_iter = (int(v) for v in values)
ValueError: invalid literal for int() with base 10: 'foo'

I have seem this bug of omission multiple times on Stackoverflow.
History
Date User Action Args
2016-02-12 23:16:53terry.reedysetrecipients: + terry.reedy, jnoller, sbt, davin, Aaron Halfaker
2016-02-12 23:16:53terry.reedysetmessageid: <1455319013.63.0.382743574906.issue26333@psf.upfronthosting.co.za>
2016-02-12 23:16:53terry.reedylinkissue26333 messages
2016-02-12 23:16:53terry.reedycreate