1

I'm trying to use multiprocessing for doing some works. But, I got that error. Why did that happen? Below is my sample code

def work(x, y):
    #doing something

def work_process(x, y):
    p = []

    for i in x:
        p.append(Process(target=work, args=(x, y)))
        p[i].start()

    for t in p:
        t.join()

    return result
user2435611
  • 1,093
  • 1
  • 12
  • 18
  • 1
    This looks fine. You are probably going to have to show some more code. – Jared Jun 12 '13 at 04:45
  • 1
    IF you copy and paste the *entire* error message, it will be more helpful. This is because the error usually shows the offending line of code in the message. It also includes the line number on which the error occurs, which will help you know what extra code you should show us when you edit your post. – SethMMorton Jun 12 '13 at 04:56
  • Two other questions: http://stackoverflow.com/questions/6728236/exception-thrown-in-multiprocessing-pool-not-detected http://stackoverflow.com/questions/13535680/python-debug-tools-for-multiprocessing – User Jun 12 '13 at 10:00

1 Answers1

0

I have written something helpful for debugging multiprocessing errors. It can show you the full traceback of an exception/error in the other process.

Download RemoteException.py

import RemoteException

@RemoteException.showError
def work(x, y):
    #doing something
User
  • 14,131
  • 2
  • 40
  • 59