twisted.internet.error.ReactorNotRestartable

shan
I am trying to run the two processes(using multiprocessing python module) where first process runs successfully but when the second process is started getting the below error(i think it is coming while trying to connect to webSocket). Each process is a seperate python program. When I run them manually as a separate program, both are running fine simultaneously. I want to run them from single program by creating two different processes using multiprocessing python module. please suggest how can we make this work?

File "C:\Users\6119141\trade\triggerCE_PE.py", line 12, in
proc2 = multiprocessing.Process(target=PE_reExit.main_pe())
File "C:\Users\6119141\trade\PE_reExit.py", line 124, in main_pe
kws.connect()
File "C:\Users\6119141\trade\venv\lib\site-packages\kiteconnect\ticker.py", line 536, in connect
reactor.run(**opts)
File "C:\Users\6119141\trade\venv\lib\site-packages\twisted\internet\base.py", line 1317, in run
self.startRunning(installSignalHandlers=installSignalHandlers)
File "C:\Users\6119141\trade\venv\lib\site-packages\twisted\internet\base.py", line 1299, in startRunning
ReactorBase.startRunning(cast(ReactorBase, self))

File "C:\Users\6119141\trade\venv\lib\site-packages\twisted\internet\base.py", line 843, in startRunning
raise error.ReactorNotRestartable()
twisted.internet.error.ReactorNotRestartable

Process finished with exit code 1

Sign In or Register to comment.