Broken pipe error while running Yfinance in streamlit


File “/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/”, line 600, in _run_script
exec(code, module.dict)
File “/mount/src/stock-market-prediction-/”, line 425, in
File “/mount/src/stock-market-prediction-/”, line 343, in main
og_ticker_data = get_historical_data(indian_stock_tickers.get(selected_ticker),
File “/mount/src/stock-market-prediction-/”, line 43, in get_historical_data
stock_data = pdr.get_data_yahoo(ticker, start=start_date, end=end_date)
File “/home/adminuser/venv/lib/python3.11/site-packages/yfinance/”, line 103, in wrapper
result = func(*args, **kwargs)
File “/home/adminuser/venv/lib/python3.11/site-packages/yfinance/”, line 177, in download
File “/home/adminuser/venv/lib/python3.11/site-packages/yfinance/”, line 861, in completed
print(’\r’ + str(self), end=‘’, file=_sys.stderr)‘’’

public app link:-
github repo link:- GitHub - kartikey-vyas-DS/Stock-market-prediction-: Stock market prediction using classification models

Same Issue

  • don’t use pandas_datareader - it is not maintained on pypi…
  • always use latest version of yfinance - because it breaks quite often, since it is no official library and a cat and mouse game…

True Franky, although i was able to solve the particular issue after several iterations, but finally one problem i could not overcome was to plot seaborn chart, if you can help with that it would be great ,
this is the repo link for reference

One problem here is that you are not calling the plotting code.