bt: bt.get gives IndexError: tuple index out of range

import bt
data = bt.get('aapl', start='2020-01-01')

Gives the following error:

`---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-12-d7d21c925953> in <module>
      1 # download data
----> 2 data = bt.get('aapl', start='2020-01-01')
      3 
      4 # calculate moving average DataFrame using pandas' rolling_mean
      5 #import pandas as pd

~/anaconda3/envs/stocks/lib/python3.8/site-packages/decorator.py in fun(*args, **kw)
    229             if not kwsyntax:
    230                 args, kw = fix(args, kw, sig)
--> 231             return caller(func, *(extras + args), **kw)
    232     fun.__name__ = func.__name__
    233     fun.__doc__ = func.__doc__

~/anaconda3/envs/stocks/lib/python3.8/site-packages/ffn/utils.py in _memoize(func, *args, **kw)
     18     # kw is not always set - check args
     19     if refresh_kw in func.__code__.co_varnames:
---> 20         if args[func.__code__.co_varnames.index(refresh_kw)]:
     21             refresh = True
     22 

IndexError: tuple index out of range
`

Using Jupyter Notebook, Python 3.8.9, bt 0.2.9, pandas 1.2.4

Any help would be appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19

Commits related to this issue

Most upvoted comments

I have the same issue after updating everything: bt 0.2.9 ffn 0.3.6 decorator 5.0.9