Introduction

yfinance users encountered a critical error starting in late 2024: ImpersonateError('Impersonating chrome136 is not supported'). This error breaks all:

  • stock data downloads
  • ticker information retrieval
  • and financial data fetching

operations, preventing developers from accessing Yahoo Finance data through the popular yfinance Python library.

The error occurs due to incompatibility between yfinance and the underlying curl_cffi library's browser impersonation mechanism, which Yahoo Finance uses to verify legitimate requests.

The Problem: ImpersonateError When Downloading Stock Data

When attempting to fetch stock prices, financial statements, or market data using yfinance, users see this error:

import yfinance as yf

ticker = yf.Ticker("AAPL")
data = ticker.history(period="1mo")

Error:
yfinance ImpersonateError('Impersonating chrome136 is not supported')

The error stems from yfinance attempting to use Chrome 136 browser fingerprinting, which isn't supported by the installed version of curl_cffi:

1 Failed download:
['AAPL']: ImpersonateError('Impersonating chrome136 is not supported')

Solution 1: Update yfinance to Latest Version

The recommended fix is updating yfinance to version 0.2.50 or later, which includes compatibility fixes.

pip install --upgrade yfinance

Verify the update:

import yfinance as yf

print(f"yfinance version: {yf.__version__}")

ticker = yf.Ticker("AAPL")
data = ticker.history(period="1mo")

print(f"Downloaded {len(data)} days of data")
print(data.head())

Output Result:

yfinance version: 0.2.50
Downloaded 20 days of data
                  Open        High         Low       Close    Volume
Date                                                                
2026-01-15  185.23  186.45  184.12  185.64  52341200
2026-01-16  186.01  187.23  185.78  186.89  48923400
...

Solution 2: Downgrade curl_cffi (Temporary Workaround)

If updating yfinance doesn't work, downgrade curl_cffi to version 0.7.4:

pip install curl_cffi==0.7.4

Then test your yfinance operations:

import yfinance as yf

msft = yf.Ticker("MSFT")
info = msft.info

print(f"Company: {info.get('longName', 'N/A')}")
print(f"Current Price: ${info.get('currentPrice', 'N/A')}")
print(f"Market Cap: ${info.get('marketCap', 0):,}")

Output Result:

Company: Microsoft Corporation
Current Price: $372.55
Market Cap: $2,765,432,000,000

Warning: This is a temporary workaround. The long-term solution is updating yfinance.

Solution 3: Clear Cache and Reinstall

Sometimes corrupted package cache causes the error. Perform a clean reinstall:

pip uninstall yfinance curl_cffi -y
pip cache purge
pip install yfinance

Solution 4: Restart the session

For JupyterLab and JupyterNotebooks restarting the notebook session could resolve the issue.

Solution 5: Change import order

Some users report that importing tensorflow BEFORE importing yfinance could solve the issue.

Source: Impersonating chrome136 is not supported #2528

Why This Error Occurs

The ImpersonateError happens because:

  1. Yahoo Finance implemented stricter bot detection in 2024
  2. yfinance uses curl_cffi to impersonate real browsers
  3. Chrome version mismatches between yfinance expectations and curl_cffi support
  4. Outdated packages don't support newer browser versions

Checking Your Package Versions

Verify your installed versions to diagnose the issue:

import yfinance
import curl_cffi

print(f"yfinance: {yfinance.__version__}")
print(f"curl_cffi: {curl_cffi.__version__}")

Recommended versions (as of 2026):

  • yfinance: 0.2.50+
  • curl_cffi: 0.7.4+ (compatible with your yfinance version)

Alternative Solution: Use API Requests with Headers

As a last resort, bypass curl_cffi entirely using the requests library with custom headers:

import requests
import pandas as pd

symbol = "GOOGL"
url = f"https://query1.finance.yahoo.com/v8/finance/chart/{symbol}"

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
}

params = {"interval": "1d", "range": "1mo"}

response = requests.get(url, params=params, headers=headers)
data = response.json()

print(f"Status: {response.status_code}")
print(f"Symbol: {data['chart']['result'][0]['meta']['symbol']}")

Note: This method requires manual data parsing and may not provide all yfinance features.

Common Environments Affected

This error particularly impacts:

  • GitHub Actions CI/CD pipelines
  • PythonAnywhere hosting
  • Docker containers with outdated images
  • Virtual environments not regularly updated
  • Automated trading bots

Quick Troubleshooting Checklist

Issue Check Fix
Chrome136 error yfinance version pip install --upgrade yfinance
Works locally, fails in cloud Platform curl_cffi support Use PythonAnywhere-compatible versions
Intermittent failures Yahoo Finance API status Add retry logic with delays
All methods fail Internet connectivity Check firewall/proxy settings

Conclusion

The yfinance ImpersonateError is resolved by ensuring version compatibility between yfinance and curl_cffi. The primary solution is updating yfinance to 0.2.50+, which handles browser impersonation correctly. For persistent issues, downgrading curl_cffi to 0.7.4 provides a temporary workaround while awaiting permanent fixes.

Most users resolve this issue within 2 minutes by simply running:

  • pip install --upgrade yfinance
  • restart of notebook
  • using API call