Error reading xls file

Hi,
I’m new streamlit user and I’m testing an app that combines streamlit and folium maps.
I have to read a file located on a web in xls format:

URL = “https://geoportalgasolineras.es/resources/files/preciosEESS_es.xls
df = pd.read_excel(URL, skiprows=3, engine=“xlrd”)

In local mode it works correctly, but when I deploy to the cloud it produces this error:

ImportError: Missing optional dependency ‘xlrd’. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.

Any suggestions?
Thanks in advance.

Xavi.

PS: requirements.txt file is updated.

Can you show your requirements file? The error message suggests you need to add xlrd to it. If you have done this and are getting the same error, try rebooting your app.

Hi,
I’ve changed xlrd=1.2.0 by xlrd and rebooting the app, it’s running ok.
Thank you very much.

1 Like