module 'signal' has no attribute 'SIGTERM' "when run cerebro.optstrategy()
-
Hi experts,
I got this error "module 'signal' has no attribute 'SIGTERM' "when run cerebro.optstrategy( );
I googled the error, it seems caused by signal.py in backtrader, it was messed up with the python3 signal module? Any suggestions are appreciated.===== Here are the the callstacks ==========
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/util.py", line 265, in _run_finalizers
finalizer()
File "/usr/lib/python3.7/multiprocessing/util.py", line 189, in call
res = self._callback(*self._args, **self._kwargs)
File "/usr/lib/python3.7/multiprocessing/pool.py", line 601, in _terminate_pool
p.terminate()
File "/usr/lib/python3.7/multiprocessing/process.py", line 124, in terminate
self._popen.terminate()
File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 62, in terminate
self._send_signal(signal.SIGTERM)
AttributeError: module 'signal' has no attribute 'SIGTERM'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/util.py", line 318, in _exit_function
p._popen.terminate()
File "/usr/lib/python3.7/multiprocessing/popen_fork.py", line 62, in terminate
self._send_signal(signal.SIGTERM)
AttributeError: module 'signal' has no attribute 'SIGTERM' -
I fixed that by renaming the signal.py in backtrader.