Using pool.map() from multiprocessing lib in python. Get the following error:
IndexError: string index out of range
Is this likely from a variable (list) which is out of range? if so how can I debug it? There's no explanation of where the error occured.
More explanation of code:
(EDIT)
def myFunction(list):
# function contents
for item in list:
# do tasks
with closing(Pool(processes=2)) as pool:
pool.map(myFunction, sublist)
pool.map(myFunction2, sublist2)
myFunctionormyFunction2. Prior to Python 3.3 exception thrown inside worker processes didn't show a proper backtrace, instead, you'd just see a trace coming from thepool.mapcall itself. Can you include the fullTraceback? You should also try wrapping all ofmyFunctionandmyFunction2in atry/exceptblock, and then usingimport traceback ; traceback.print_exc()to so you can see what the real Traceback is.for item in listloops inmyFunctionwhich I think are broken... I'm working with a lot of variables so will take me some time today to go through it, but thanks for your traceback suggestion, i might implement that to make it easier to debug :) will post solution if im able.