Broken pipe error while running Yfinance in streamlit

BrokenPipeError:

‘’‘Traceback:
File “/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 600, in _run_script
exec(code, module.dict)
File “/mount/src/stock-market-prediction-/hello_streamlit.py”, line 425, in
main()
File “/mount/src/stock-market-prediction-/hello_streamlit.py”, line 343, in main
og_ticker_data = get_historical_data(indian_stock_tickers.get(selected_ticker),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/mount/src/stock-market-prediction-/hello_streamlit.py”, 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/utils.py”, line 103, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/adminuser/venv/lib/python3.11/site-packages/yfinance/multi.py”, line 177, in download
shared._PROGRESS_BAR.completed()
File “/home/adminuser/venv/lib/python3.11/site-packages/yfinance/utils.py”, line 861, in completed
print(’\r’ + str(self), end=‘’, file=_sys.stderr)‘’’

public app link:- https://richkart9999999999.streamlit.app/
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.