-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: yfinance failed to decrypt Yahoo data response with hardcoded keys, contact developers #1329
Comments
I've quickly tested and working for me. Error message tells us there are 8 fields when |
I updated my code to handle the exception and retry the request. That has fixed the issue for me. |
I'm getting the same error, specifically with ticker FFIV when calling the Tickers.ticker.quarterly_financials attribute. |
Hi, I have tried this branch and it doesn't seem to fix the issue |
I never said it would fix the decryption. |
Okay. In case it helps, the issue seems to occur with paginated/large? requests. |
What will help is posting the fixed error message. EDIT: WITH THE BRANCH!
|
The error message with your branch is attached |
Seems to be the same error message on the branch. It is intermittent. I'm fetching about 24 tickers one at a time in my script and hits pretty randomly. |
Seems like the first key works anyway. I simply removed the check for l == 1. Not sure that's the right answer though. |
Getting the exact same error since this morning. Edit: I tried my code over on Jupyter Notebook to see if the issue persists. At the point where a for loop downloads and appends the 'regularMarketPrice', 'sector' and 'industry' info for 41 different tickers to the dataframe, it gives this error at a random point, so i had to run the same snippet multiple times until it doesn't. I found that issue duplicates at "Ticker.info" for yf. Hope a permanent fix comes soon. |
Thanks @mmm0. Wow that is a lot of keys. I've made two more changes to branch, please run again:
In case not obvious: feedback wanted |
I'm getting this issue when I run a number of requests, but it seems OK if I just do a single request, by hand I wonder if they've added some kind of frequency of request checks? |
@AlefTester Start by reading this thread. |
Doesn't work for me. I'm using Ticker() since the beginning. |
With the latest
|
Using the first key isn't working anymore either. And I'm getting 10004 keys to pick from. They really are trying to make this hard. (And are probably watching this conversation). |
How did you do that ? |
Not sure if it works today. As for yesterday this issue was quite random, today I'm retrying every 10minutes and got no proper response yet |
I was using this code to get tickers one at a time (including reading all tickers returned each time), with random delays between each get and retrying ones that failed - that was OK for most of yesterday, but is now broken - the JSON returned by
Yesterday the problem def seemed to be caused by getting too frequently - like they were throttling the query rate |
Any chance this bug will be fixed today? I'm using yfinance for a project I'm handing in for graduation tomorrow. Previously, the error occurred sometimes and restarting the code solved the problem, but today the error appears every time when I want to run the code |
waiting for him to fix, you can try to get the information differently
|
Problem seems to have got worse overnight, affecting me now. Please keep thread posts constructive from now. @dschaefer I've tried ALL the keys, none work. @Sebastvin Impossible to know chance. Depends on community. For those that need the data, look into |
works for me, thank you! |
PIP release out |
Using version 0.2.7, |
there should be error message, use |
@jiangoz It should print a message explaining where it's moved to. |
I meant it's also not in Is |
The attribute 'beta' used to be in Ticker.Info, but now couldn't find it also in the metadata or fast_info. Any idea where it was relocated to? |
Yes, and to
I haven't moved |
@ValueRaider you are right, it seems I checked with MSFT and for some reason for that ticker while the attribute exists it returns 'None'. I check with another ticker (e.g., AAPL) and the value was returned. |
If I understand correctly the yahoo store now is missing several important information about prices, events etc above the always changes in decryption. Also they have implement throttling due to various test I made. The Yahoo policy to make difficult to get data will lead eventually to parse the page in a very ugly manner (yahoo.com is dead and with all this changes they will lead to the same road the finance.yahoo.com). @yahoo is it better to spend your time in make data available (as you load them in your page) rather than spend your time in bs changes and make your page slower to load? |
The data was always there, encrypted. They just changed encryption parameters. Throttling has always existed but it depends on the data you request. |
The data was there years ago in raw format. Before crumb there was no throttling, now is there an algorithm you must follow to get the data without errors, because of throttling |
I would like to thank you for your excellent work! |
Only post here if you are experiencing decryption problems. If your issue is different - some might say new - make a New Issue. |
Cannot install latest version using "pip3 install yfinance", still showing 0.2.4; when trying to force it by "pip3 install version==0.2.7 yfinance", the version cannot be found. |
workaround: info = yf.Ticker(symbol).info type(info) convert it to dictionary and your code should work: info = dict(info) |
@Dr-DFTD3 @dkim777 @EmirEgilli I've started a new Issue thread for this. #1407 |
I use Python 3.8
Installed yfinance 0.2.4
I'm pulling the info of a ticker using this code:
info = yf.Ticker(symbol).info
And I'm getting this error message:
Does someone know how to fix it?
EDIT from @ValueRaider
In case you're confused by title not matching this top post - I edited title to reflect the latest error message. Discussion below still very relevent.
EDIT: New discussion starting in #1407
The text was updated successfully, but these errors were encountered: