You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I import the packages:
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('Agg')
import datetime
%matplotlib inline
from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
from finrl.meta.preprocessor.preprocessors import FeatureEngineer, data_split
from finrl.meta.env_stock_trading.env_stocktrading import StockTradingEnv
from finrl.agents.stablebaselines3.models import DRLAgent
from stable_baselines3.common.logger import configure
from finrl.meta.data_processor import DataProcessor
from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline
from pprint import pprint
import sys
sys.path.append("../FinRL")
import itertools
However, since today I get the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 9, in <cell line: 9>
from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline
File "/usr/local/lib/python3.10/site-packages/finrl/init.py", line 5, in
from finrl.train import train
File "/usr/local/lib/python3.10/site-packages/finrl/train.py", line 10, in
from finrl.meta.data_processor import DataProcessor
File "/usr/local/lib/python3.10/site-packages/finrl/meta/data_processor.py", line 8, in
from finrl.meta.data_processors.processor_yahoofinance import (
File "/usr/local/lib/python3.10/site-packages/finrl/meta/data_processors/processor_yahoofinance.py", line 21, in
import yfinance as yf
File "/usr/local/lib/python3.10/site-packages/yfinance/init.py", line 23, in
from .ticker import Ticker
File "/usr/local/lib/python3.10/site-packages/yfinance/ticker.py", line 28, in
from .base import TickerBase
File "/usr/local/lib/python3.10/site-packages/yfinance/base.py", line 40, in
from .scrapers.history import PriceHistory
First I install the packages like stated in the examples:
install required packages
!pip install swig
!pip install wrds
!pip install pyportfolioopt
install finrl library
!pip install -q condacolab
import condacolab
condacolab.install()
!apt-get update -y -qq && apt-get install -y -qq cmake libopenmpi-dev python3-dev zlib1g-dev libgl1-mesa-glx swig
!pip install git+https://github.com/AI4Finance-Foundation/FinRL.git
Then I import the packages:
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('Agg')
import datetime
%matplotlib inline
from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
from finrl.meta.preprocessor.preprocessors import FeatureEngineer, data_split
from finrl.meta.env_stock_trading.env_stocktrading import StockTradingEnv
from finrl.agents.stablebaselines3.models import DRLAgent
from stable_baselines3.common.logger import configure
from finrl.meta.data_processor import DataProcessor
from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline
from pprint import pprint
import sys
sys.path.append("../FinRL")
import itertools
However, since today I get the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 9, in <cell line: 9>
from finrl.plot import backtest_stats, backtest_plot, get_daily_return, get_baseline
File "/usr/local/lib/python3.10/site-packages/finrl/init.py", line 5, in
from finrl.train import train
File "/usr/local/lib/python3.10/site-packages/finrl/train.py", line 10, in
from finrl.meta.data_processor import DataProcessor
File "/usr/local/lib/python3.10/site-packages/finrl/meta/data_processor.py", line 8, in
from finrl.meta.data_processors.processor_yahoofinance import (
File "/usr/local/lib/python3.10/site-packages/finrl/meta/data_processors/processor_yahoofinance.py", line 21, in
import yfinance as yf
File "/usr/local/lib/python3.10/site-packages/yfinance/init.py", line 23, in
from .ticker import Ticker
File "/usr/local/lib/python3.10/site-packages/yfinance/ticker.py", line 28, in
from .base import TickerBase
File "/usr/local/lib/python3.10/site-packages/yfinance/base.py", line 40, in
from .scrapers.history import PriceHistory
File "/usr/local/lib/python3.10/site-packages/yfinance/scrapers/history.py", line 1207
logger.debug(f'price-repair-split: Splits: {str(df['Stock Splits'][split_f].to_dict())}')
^
SyntaxError: f-string: unmatched '['
You get this error for almost all packages I import from the finrl library. Has there been an update?
The text was updated successfully, but these errors were encountered: