-
-
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
Incorrect output for YFxxx exceptions #2251
Comments
It makes more sense when multiple tickers are invalid:
It's grouping tickers with the same error. Maybe the |
Sorry, but that's not my point. A few lines before, the placeholder %ticker% is introduced. And it is not filled, but the list is written in front of the actual log entry with the description of the requested tickers and the problem.
|
Describe bug
For YFxxx exceptions the output is:
I suspect the intended output is
The error is in multi.py, function download
instead of
it should be
Simple code that reproduces your problem
Debug log
DEBUG Entering download()
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG Entering history()
DEBUG MSF.DE: Yahoo GET parameters: {'range': '1d', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG Entering _make_request()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/MSF.DE
DEBUG params={'range': '1d', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG loaded persistent cookie
DEBUG reusing cookie
DEBUG crumb = '0DlVzIFi41Z'
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=200
DEBUG Exiting _make_request()
DEBUG Exiting get()
DEBUG MSF.DE: yfinance received OHLC data: 2025-01-31 16:36:23 only
DEBUG MSF.DE: OHLC after cleaning: 2025-01-31 17:36:23+01:00 only
DEBUG MSF.DE: OHLC after combining events: 2025-01-31 00:00:00+01:00 only
DEBUG MSF.DE: yfinance returning OHLC: 2025-01-31 00:00:00+01:00 only
DEBUG Exiting history()
DEBUG Exiting history()
DEBUG Entering history()
DEBUG Entering _fetch_ticker_tz()
DEBUG Entering get()
DEBUG Entering _make_request()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/QUATSCH
DEBUG params=frozendict.frozendict({'range': '1d', 'interval': '1d'})
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG reusing cookie
DEBUG reusing crumb
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=404
DEBUG toggling cookie strategy basic -> csrf
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'csrf'
DEBUG Entering _get_crumb_csrf()
DEBUG loaded persistent cookie
DEBUG Failed to find "csrfToken" in response
DEBUG Exiting _get_crumb_csrf()
DEBUG toggling cookie strategy csrf -> basic
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG loaded persistent cookie
DEBUG reusing cookie
DEBUG crumb = '0DlVzIFi41Z'
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=404
DEBUG Exiting _make_request()
DEBUG Exiting get()
DEBUG Got error from yahoo api for ticker QUATSCH, Error: {'code': 'Not Found', 'description': 'No data found, symbol may be delisted'}
DEBUG Exiting _fetch_ticker_tz()
DEBUG Entering history()
DEBUG QUATSCH: Yahoo GET parameters: {'range': '1d', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG Entering _make_request()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/QUATSCH
DEBUG params={'range': '1d', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG reusing cookie
DEBUG reusing crumb
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=404
DEBUG toggling cookie strategy basic -> csrf
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'csrf'
DEBUG Entering _get_crumb_csrf()
DEBUG loaded persistent cookie
DEBUG Failed to find "csrfToken" in response
DEBUG Exiting _get_crumb_csrf()
DEBUG toggling cookie strategy csrf -> basic
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG loaded persistent cookie
DEBUG reusing cookie
DEBUG crumb = '0DlVzIFi41Z'
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=404
DEBUG Exiting _make_request()
DEBUG Exiting get()
ERROR
1 Failed download:
ERROR ['QUATSCH']: YFPricesMissingError('$%ticker%: possibly delisted; no price data found (period=1d) (Yahoo error = "No data found, symbol may be delisted")')
DEBUG ['QUATSCH']: Traceback (most recent call last):
File "C:\Users\meyer\Projects\Github\Current\meindepot.venv\Lib\site-packages\yfinance\multi.py", line 272, in _download_one
data = Ticker(ticker).history(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\meyer\Projects\Github\Current\meindepot.venv\Lib\site-packages\yfinance\utils.py", line 104, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\meyer\Projects\Github\Current\meindepot.venv\Lib\site-packages\yfinance\base.py", line 81, in history
return self._lazy_load_price_history().history(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\meyer\Projects\Github\Current\meindepot.venv\Lib\site-packages\yfinance\utils.py", line 104, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\meyer\Projects\Github\Current\meindepot.venv\Lib\site-packages\yfinance\scrapers\history.py", line 245, in history
raise _exception
yfinance.exceptions.YFPricesMissingError: $%ticker%: possibly delisted; no price data found (period=1d) (Yahoo error = "No data found, symbol may be delisted")
DEBUG Exiting download()
Bad data proof
No bad data
yfinance
version0.2.52
Python version
3.12.8
Operating system
Windows 11
The text was updated successfully, but these errors were encountered: