使用pathos.multiprocessing的AssertionError

时间:2016-11-22 04:59:08

标签: python python-2.7 pathos

我使用的是python 2.7。这是我的一些代码:

setHomeConfigData

但是当我运行这个时,我得到一个空白的from pathos.multiprocessing import ProcessingPool as Pool class pair_scraper(object): #code and various methods ... def parallelized_processing(self): ''' Parallelize length extraction of relevant files. ''' pool = Pool(self.pool_size) pool.map(self.length_processer, self.zip_files) pool.close() pool.join()

AssertionError

这个错误似乎与in this question所描述的错误类似,尽管那里的修复更为明显。我运行上面的代码删除了/...file.py in parallelized_processing(self) 69 ''' 70 pool = Pool(self.pool_size) ---> 71 pool.map(self.length_processer, self.zip_files) 72 # pool.close() 73 # pool.join() /.../anaconda/lib/python2.7/site-packages/pathos/multiprocessing.pyc in map(self, f, *args, **kwds) 134 AbstractWorkerPool._AbstractWorkerPool__map(self, f, *args, **kwds) 135 _pool = self._serve() --> 136 return _pool.map(star(f), zip(*args)) # chunksize 137 map.__doc__ = AbstractWorkerPool.map.__doc__ 138 def imap(self, f, *args, **kwds): /.../anaconda/lib/python2.7/site-packages/multiprocess/pool.pyc in map(self, func, iterable, chunksize) 248 Equivalent of `map()` builtin 249 ''' --> 250 assert self._state == RUN 251 return self.map_async(func, iterable, chunksize).get() 252 AssertionError: pool.close()但得到了相同的结果。

思想?

0 个答案:

没有答案