-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Bug] stocks/load
Concatenation error while loading a ticker
#3796
Comments
Looks like this is an issue with yahoo changing up their api. There is currently a yfinance issue tracking the issue. |
Looks like this impacts all tickers. (🦋) /stocks/ $ load rnlsy
Loading Daily data for RNLSY with starting period 2019-12-13.
Error: can only concatenate str (not "NoneType") to str
(🦋) /stocks/ $ load spx
1 Failed download:
- SPX: No data found for this date range, symbol may be delisted
(🦋) /stocks/ $ load spy
Loading Daily data for SPY with starting period 2019-12-13.
Error: can only concatenate str (not "NoneType") to str
(🦋) /stocks/ $ load spy
Loading Daily data for SPY with starting period 2019-12-13.
Error: can only concatenate str (not "NoneType") to str
(🦋) /stocks/ $ load spy --source Polygon
Loading Daily data for SPY with starting period 2019-12-13.
Error: can only concatenate str (not "NoneType") to str |
This one? ranaroussi/yfinance#1246 From the discussion it seems that they have deliberately decided to encode the data |
Yup. The current workaround will be to select another source |
Looking at it -- I think the additional stats are what are breaking. Seems like the download still works. Do options and futures still work? |
Futures, yes. Options, nope: (🦋) /stocks/options/ $ chains --source YahooFinance
Error: float() argument must be a string or a real number, not 'NoneType'
Error: 'list' object has no attribute 'fillna' |
Will need to dig but my guess is options not working because it requires getting the last price from ticker.info which is what seems to be breaking. |
This is a great way to get rate-limited/blocked by Yahoo's spam detector. Use |
So it appears that this issue is resolved with a yFinance version bump:
|
#3801 should fix this. Updates coming in the next day or so |
Nice!! Thx you!! Works!! |
Describe the bug
Python message shows up stating the following error "Error: can only concatenate str (not "NoneType") to str"
To Reproduce
Screenshots
Desktop (please complete the following information):
Additional context
This error started to appear today, i.e Saturday December 17, 2022, CET, couple of days before there was no such behaviour, I stumbled upon this while I was investigating the cause of #3752
Commit: fb667ce
The text was updated successfully, but these errors were encountered: