OperationalError(‘unable to open database file’)

Github URL: https://github.com/arisshokri/Yearly-Symbol-Prices-Multiple/blob/main/yearly_symbol_prices_multiple.py

Streamlit URL: https://yearly-symbol-price-multiple.streamlit.app/

I am running a Pythin Script that used to work just fine few months ago.

The same exact script works just fine in my local machine as of right now wtih no issues.

It seems when is deployed it can’t connect to yahoo finance database and download data.

I have updated the requirments here:

streamlit==1.27.0
yfinance==0.2.29
pandas==2.1.1
DateTime==5.2
matplotlib==3.8.0
numpy==1.26.0

Is very strange because once again locally is working just fine.

App On Cloud:

App Local:

That’s the error I get :

2 Failed downloads: [‘^IXIC’, ‘AMZN’]: OperationalError(‘unable to open database file’)

Operational Error:

Hey @Aris_Shokri,

Based on this thread, it looks like downgrading to yfinance 0.2.28 might resolve this issue.

Hello,

Thanks, downgrading to yfinance 0.2.28 fixed the issue.

Here’s a post with a bit more detail about why this is necessary Fix for yfinance > 0.2.28 on Community Cloud

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.