Error while using Multiprocessing.Pool in python -
i tried options not able find issue below code, works when call sub self.processxmlfile(xml_file) throws below error multiprocessing when print result_list:
cpickle.picklingerror: can't pickle <type 'instancemethod'>: attribute lookup __builtin__.instancemethod failed
pool = multiprocessing.pool(processes=4) result_list = [] xml_file in os.listdir(self.local_folder): result_list.append(pool.apply_async(self.processxmlfile, args = (xml_file,))) pool.close() pool.join()
Comments
Post a Comment