yfinance has completely stopped working

See original GitHub issue

I can’t find any info on this issue, but I have no idea why it’s happening. Been using yfinance to pull data from a few hundred stocks each day, and it’s been working fine for a few months. Then last night, suddenly every single ticker symbol gives a “SymbolWarning: Failed to read symbol” error. Every single one. Tried running the code again, tried waiting until this morning to run it, it’s still happening. Is it possible yahoo is blocking my IP address or something? I tried adding a time.sleep method of 1 second between each stock to avoid this, but it doesn’t seem to have done anything, so I removed it.

Code below: `import pandas_datareader as web from datetime import datetime import pandas as pd

start = datetime(2020,9,1) end = datetime(2021,12,31) stock = [ ‘ACHC’, ‘ACIW’, [many more stocks listed here cut for simplicity], ‘TECH’, ‘SAM’]

df = web.DataReader(stock, ‘yahoo’, start, end) df.to_excel(f’excelfilename.xlsx’)`

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanngcommented, Jul 2, 2021
0reactions
impredicativecommented, Jul 6, 2021

@matt-wetmore If you just want to suppress the warning:

import contextlib
import io
import yfinance as yf

with contextlib.redirect_stdout(io.StringIO()):
    yf.download(...)

This suppression is ugly but it looks to work for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Did yfinance and yahoo_fin for Python stop working recently?
The yfinance has been working for me just fine and is only very recently that it stopped. Just days ago the code ran...
Read more >
yfinance stops working · Issue #836 - GitHub
I just noticed that yfinance is no longer working, or unstable. First, I was trying to download today's OHLV of 7000 tickers, ...
Read more >
Error importing y-finance and pulling data from data from yahoo
But now I am no longer able to pull data from yahoo or even importing y-finance is not working. Anyone here knows why??...
Read more >
How to Fix Yahoo Finance App Not Working - YouTube
notopen #notworking #notopening #YahoofinanceIn this video, i will show you how to Fix Yahoo Finance App Not Working | Yahoo Finance Not ...
Read more >
yfinance Python Tutorial (2022) - Analyzing Alpha
Since Yahoo decommissioned their AP on May 15th, 2017 (a move that left developers searching for an adequate alternative), Ran's yfinance fit ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found