I’m using “startinpy” library (https://startinpy.readthedocs.io/en/0.10.2/) in my project. It generally works great, but when I want to use it in second process, the pickle error shows up:
TypeError: cannot pickle 'builtins.DT' object
MRE:
import startinpy
from multiprocessing import Process
class WorkCl:
def __init__(self):
self.dtm = DTM() # PROCESS
self.dtm.start()
time.sleep(1)
class DTM(Process):
def __init__(self):
Process.__init__(self)
self.dt = startinpy.DT()
if __name__ == '__main__':
wcl = WorkCl()
Does anyone know, how to make this work? I need to use the “dt” object as class object, because I’m using it inside various class methods. Also I’m using multiprocessing Event object to stop the process.
I have found library called “pathos” (https://pathos.readthedocs.io/en/latest/pathos.html) but I don’t understand how exactly replace the standard multiprocessing module with it. Can anyone help?