title: debugging errors in python multiprocessing
body: <p>I'm using the <code>Pool</code> function of the <code>multiprocessing</code> module in order to run the same code in parallel on different data. </p>
  
  <p>It turns out that on some data my code raises an exception, but the precise line in which this happens is not given:</p>
  
  <pre><code>Traceback (most recent call last):
    File "my_wrapper_script.py", line 366, in &lt;module&gt;
      main()
    File "my_wrapper_script.py", line 343, in main
      results = pool.map(process_function, folders)
    File "/usr/lib64/python2.6/multiprocessing/pool.py", line 148, in map
      return self.map_async(func, iterable, chunksize).get()
    File "/usr/lib64/python2.6/multiprocessing/pool.py", line 422, in get
      raise self._value
  KeyError: 'some_key'
  </code></pre>
  
  <p>I am aware of <code>multiprocessing.log_to_stderr()</code> , but it seems that it is useful when concurrency issues arise, which is not my case.</p>
  
  <p>Any ideas?</p>