Продолжайте получать эту ошибку при попытке параллельного процесса в python:
An error has occured during the function import
Traceback (most recent call last):
File "/home/runner/.site-packages/ppft/__main__.py", line 100, in
run
six.exec_(__fobj)
File "<string>", line 46, in <module>
ModuleNotFoundError: No module named 'ppft.exceptions'
A fatal error has occured during the function execution
Traceback (most recent call last):
File "/home/runner/.site-packages/ppft/__main__.py", line 109,
in run
__f = locals()[ppc.str_(__fname)]
KeyError: 'run_test'
Вот код моего кода:
from pathos.pools import ParallelPool as Pool
urls = ["https://www.baidu.com", "https://google.com/"]
def run_test(url):
#getting and storing a bunch of JSON data from urls in here
#content here did not produce errors when doing single process
pool = Pool(4)
print(pool.map(run_test, urls))
pool.close()
pool.join()
Пожалуйста, кто-нибудь может помочь мне понять ошибку / проблему?