TypeError: 'type' object is not subscriptable
Alexhk01 opened this issue · 0 comments
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Go to '...': FinRL_PaperTrading_Demo.ipynb
- Click on '....': Import related modules
- Scroll down to '....'
- See error:
TypeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 from finrl.config_tickers import DOW_30_TICKER
2 from finrl.config import INDICATORS
3 from finrl.meta.env_stock_trading.env_stocktrading_np import StockTradingEnv
File E:\qw_e\FinRL\finrl_init_.py:4
1 from future import annotations
3 from finrl.test import test
----> 4 from finrl.trade import trade
5 from finrl.train import train
File E:\qw_e\FinRL\finrl\trade.py:3
1 from future import annotations
----> 3 from finrl.meta.env_stock_trading.env_stock_papertrading import AlpacaPaperTrading
4 from finrl.test import test
7 def trade(
8 start_date,
9 end_date,
(...)
22 **kwargs,
23 ):
File E:\qw_e\FinRL\finrl\meta\env_stock_trading\env_stock_papertrading.py:13
10 import pandas as pd
11 import torch
---> 13 from finrl.meta.data_processors.processor_alpaca import AlpacaProcessor
16 class AlpacaPaperTrading:
17 def init(
18 self,
19 ticker_list,
(...)
34 ):
35 # load agent
File E:\qw_e\FinRL\finrl\meta\data_processors\processor_alpaca.py:11
9 import pandas as pd
10 import pytz
---> 11 from stockstats import StockDataFrame as Sdf
14 class AlpacaProcessor:
15 def init(self, API_KEY=None, API_SECRET=None, API_BASE_URL=None, api=None):
File ~\AppData\Local\anaconda3\envs\fin\lib\site-packages\stockstats.py:94
43 pass
46 _dft_windows = {
47 # sort alphabetically
48 'ao': (5, 34),
(...)
90 'vwma': 14,
91 }
---> 94 def set_dft_window(name: str, windows: Union[int, tuple[int, ...]]):
95 ret = _dft_windows.get(name)
96 _dft_windows[name] = windows
TypeError: 'type' object is not subscriptable
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] :win11
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.