Question regarding multiprocessing and error: Can't pickle <type



Hi all,

Thanks in advance for any suggestions. I'm getting the following:

Exception in thread Thread-1:
Traceback (most recent call last):
File "/work/tjl/apps/lib/python2.6/", line 525, in
File "/work/tjl/apps/lib/python2.6/", line 477, in run
self.__target(*self.__args, **self.__kwargs)
File "/work/tjl/apps/lib/python2.6/multiprocessing/", line
225, in _handle_tasks
PicklingError: Can't pickle <type 'instancemethod'>: attribute lookup
__builtin__.instancemethod failed

The code block which calls this is:

def processGrids(self, grids):
Get each grid within the time range and initiate processing
for each grid

numberOfGrids = float(len(grids))

import multiprocessing, functools
pool = multiprocessing.Pool(processes=2), [(grid, index, grids) for
index, grid in enumerate(grids)])


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question