pydata / pandas-datareader

Extract data from a wide range of Internet sources into a pandas DataFrame.

Home Page:https://pydata.github.io/pandas-datareader/stable/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError when indexing response from DataReader with 'yahoo' as data source

lukemvc opened this issue · comments

commented

When using pandas_datareader.DataReader() with 'yahoo' as the source there is a TypeError 'string indices must be integers'.

The issue appears to be in yahoo/daily.py on line 153, when trying to access 'data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"]'.

The "HistoricalPriceStore" field isnt able to be indexed anymore, I assume yahoo changed somehting in their api. I was able to index j["context"]["dispatcher"]["stores"] and the value is now a base64 encoded string, which explains the TypeError.

I tried to decode the string to access the "HistoricalPriceStore" field, but when decoded it begins with 'Salted__' and i wasnt able to figure out how to decode it from there.

commented

Found that its already open in a different issue #952