0
我試圖使用多處理來做一些工作。但是,我得到了那個錯誤。爲什麼會發生?以下是我的示例代碼TypeError:'tuple'對象在python的多處理中無法調用
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
這看上去很好。你可能將不得不展示更多的代碼。 – Jared
如果您複製並粘貼*整個*錯誤消息,則會更有幫助。這是因爲錯誤通常顯示消息中有問題的代碼行。它還包括髮生錯誤的行號,這將幫助您瞭解在編輯帖子時應向我們顯示哪些額外的代碼。 – SethMMorton
另外兩個問題:http://stackoverflow.com/questions/6728236/exception-thrown-in-multiprocessing-pool-not-detected http://stackoverflow.com/questions/13535680/python-debug-tools-for-多 – User