Open VISION3635 opened 11 months ago
Traceback (most recent call last): File "D:\algo_trding_learning\buylowsellhigh.py", line 5, in goog_data = data.DataReader('GOOG', 'yahoo', start_date, end_date) TypeError: string indices must be integers
Try replacing line 5 with the following: goog_data = pdr.get_data_yahoo('GOOG', start_date, end_date)
Also, add the below at the beginning of your file: from pandas_datareader import data as pdr import yfinance as yfin yfin.pdr_override()
The problem was already addressed in this previous issue. https://github.com/PacktPublishing/Learn-Algorithmic-Trading/issues/17#issuecomment-1644869787
xd im getting this error . thx for rewieving this issue , not sure if its a library mistake or something else ; as im a beginner ... thx for helping me out ( ;
D:\algo_trding_learning\venv\Scripts\python.exe D:\algo_trding_learning\buylowsellhigh.py Traceback (most recent call last): File "D:\algo_trding_learning\buylowsellhigh.py", line 5, in
goog_data = data.DataReader('GOOG', 'yahoo', start_date, end_date)
File "D:\algo_trding_learning\venv\lib\site-packages\pandas\util_decorators.py", line 213, in wrapper
return func(*args, **kwargs)
File "D:\algo_trding_learning\venv\lib\site-packages\pandas_datareader\data.py", line 370, in DataReader
return YahooDailyReader(
File "D:\algo_trding_learning\venv\lib\site-packages\pandas_datareader\base.py", line 253, in read
df = self._read_one_data(self.url, params=self._get_params(self.symbols))
File "D:\algo_trding_learning\venv\lib\site-packages\pandas_datareader\yahoo\daily.py", line 153, in _read_one_data
data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]
TypeError: string indices must be integers
Process finished with exit code 1