Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    module 'signal' has no attribute 'SIGTERM' "when run cerebro.optstrategy()

    General Discussion
    1
    2
    135
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      skynet last edited by

      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'

      1 Reply Last reply Reply Quote 0
      • S
        skynet last edited by

        I fixed that by renaming the signal.py in backtrader.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors