pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.9k stars 284 forks source link

TypeError: string indices must be integers #185

Closed Allensususu closed 1 year ago

Allensususu commented 1 year ago

Hi

Today, when I was using ffn, I found that an error would be reported. After checking, it should be that the information obtained by yahoo finance has been revised. Could you please check it?

Here is the discussion I found https://stackoverflow.com/questions/74832296/typeerror-string-indices-must-be-integers-when-getting-data-of-a-stock-from-y

thank you very much

GiovaMille commented 1 year ago

Just to provide more details, I run the example that pmorisette suggest in the FFN overview. In the attached file you can fine the complete error output.

FFN-outcome.pdf

Allensususu commented 1 year ago

I fix it with yfinance.pdr_override()

you can add import yfinance yfinance.pdr_override() in ffn data.py 142 lines.

like this : image

GiovaMille commented 1 year ago

import yfinance yfinance.pdr_override()

It worked! Thank you!

gerrymarrk commented 1 year ago

import yfinance yfinance.pdr_override() It works for me as well, really appreciated!!