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/

    AttributeError: '_thread._local' object has no attribute 'minperiods'

    bta-lib
    2
    2
    386
    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.
    • Quique MP
      Quique MP last edited by

      Hi all

      I am trying to use the rocr function within a threading class and I obtain the following error:

      self.ROC_r_3 = rocr(self.Close_df, period=3).df['rocr'].values
      File "/Users/quiquemorgades/binance_env3/lib/python3.7/site-packages/btalib/indicator.py", line 110, in call
      self.outputs = self.o = meta.outputs._from_class(cls)
      File "/Users/quiquemorgades/binance_env3/lib/python3.7/site-packages/btalib/meta/outputs.py", line 30, in _from_class
      return _CLSOUTPUTScls # defvals params in dict format
      File "/Users/quiquemorgades/binance_env3/lib/python3.7/site-packages/btalib/meta/lines.py", line 630, in init
      metadata.minperiods[self] = [1] * len(self)
      AttributeError: '_thread._local' object has no attribute 'minperiods'

      I don't understand the error as it has worked previously fine, anyone can give me some help?
      Thanks

      1 Reply Last reply Reply Quote 0
      • A
        amin last edited by amin

        There is this problem for me
        I encountered this problem when I wanted to use the threading package
        You can send the code

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