Skip to content

Error downloading data for "AAPL": No price data found (1d 2019-01-01 -> 2021-06-12) #1797

Closed

Description

@YeakubSadlil

Describe bug

I'm encountering an error when attempting to download AAPL data and stock ticker using yfinance. The specific error message is:

[*********************100%%**********************]  1 of 1 completed

1 Failed download:
['AAPL']: Exception('%ticker%: No price data found, symbol may be delisted (1d 2019-01-01 -> 2021-01-01)')

I tried running the code snippet on other laptops and on Kaggle, where it worked well. However, it fails to download data only on my laptop.

Troubleshooting Steps Attempted:

  • Reinstalling yfinance
  • Checking several date range
  • Checking several times on different days
  • Checking with different stock tickers

Code that produces the problem

import pandas as pd
import yfinance as yf

aapl_df = yf.download('AAPL', 
                    start='2019-01-01', 
                    end='2021-06-12',
)

Debug log

DEBUG    Entering download()
DEBUG     Disabling multithreading because DEBUG logging enabled
DEBUG     Entering history()
DEBUG      AAPL: Yahoo GET parameters: {'period1': '2019-01-01 00:00:00-05:00', 'period2': '2021-01-01 00:00:00-05:00', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG      Entering get()
DEBUG       url=https://query2.finance.yahoo.com/v8/finance/chart/AAPL
DEBUG       params=frozendict.frozendict({'period1': 1546318800, 'period2': 1609477200, '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()
ERROR     1 Failed download:
ERROR     ['AAPL']: Exception('%ticker%: No price data found, symbol may be delisted (1d 2019-01-01 -> 2021-01-01)')
DEBUG     ['AAPL']: Traceback (most recent call last):
            File "/home/yakub/.local/lib/python3.10/site-packages/yfinance/multi.py", line 279, in _download_one
            File "/home/yakub/.local/lib/python3.10/site-packages/yfinance/utils.py", line 108, in wrapper
            File "/home/yakub/.local/lib/python3.10/site-packages/yfinance/base.py", line 267, in history
          Exception: %ticker%: No price data found, symbol may be delisted (1d 2019-01-01 -> 2021-01-01)
DEBUG    Exiting download()

Bad data proof

No response

yfinance version

0.2.33

Python version

3.10.13

Operating system

Ubuntu 22.04.3 LTS

Activity

  1. TheLazyGamer commented on Dec 23, 2023

    @TheLazyGamer

    I'm experiencing the same issue with Windows 10 and Python version 3.10.2. Happy to provide any log info if needed

  2. nzooherd commented on Dec 31, 2023

    @nzooherd

    I also can't find AAPL price data when i download through http proxy because I live in China.
    But when I run the code on a cloud vps is USA. Everythin is OK.

  3. mckelvin commented on Feb 19, 2024

    @mckelvin

    Try to run with raise_errors=True, e.g.:

    aapl_df = yf.download('AAPL',
    start='2019-01-01',
    end='2021-06-12',
    raise_errors=True
    )

    Then you will see the underlying errors.

  4. jarmo-seljamaa commented on Feb 26, 2024

    @jarmo-seljamaa

    Try to run with raise_errors=True, e.g.:

    I believe raise_errors is not supported in .download()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions