Can we deploy Excel files in Streamlit Cloud?

Good Afternoon, i have deployed several excel files in host. However, when i have tried to deploy an excel file in the cloud service i get the following error.

TypeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 557, in _run_script
    exec(code, module.__dict__)File "/app/portfolio_au/Portfolio.py", line 57, in <module>
    df = pd.read_excel(archivo_excel,

Thank you

Hi @cjd1011

Thanks for the question. Do you have a link to the GitHub repo, which would help us see the general file/directory structure of the repo, and see if we can find a fix for this.

Best regards,
Chanin

The error you encountered indicates that there was a problem with reading the Excel file in your Streamlit Cloud application. Without the specific error message, it’s challenging to determine the exact cause of the issue. However, here are a few suggestions:

File Path: Make sure that the file path you provided to the pd.read_excel() function is correct. Check if the Excel file is located in the expected location and that the path is accessible in the Streamlit Cloud environment.

File Format: Ensure that the Excel file you are trying to read is in a compatible format. Streamlit uses the pandas library to read Excel files, and it supports various Excel file formats such as .xls and .xlsx. If your file is in a different format, you might need to convert it to a supported format before reading it with pd.read_excel().

Dependencies: Check if your Streamlit Cloud environment has all the necessary dependencies installed to handle Excel files. The pandas library should be available in your environment, as it provides the functionality for reading Excel files. You can include the necessary dependencies in your requirements.txt file or specify them using another dependency management approach supported by Streamlit Cloud.

File Size: Consider the size of your Excel file. If the file is large, it might exceed the resource limits of Streamlit Cloud. In such cases, you may need to optimize or preprocess the data before reading it to reduce the file size or limit the amount of data being loaded at once.

Error Logs: As mentioned in the error message, the full error details should be available in the logs of your Streamlit Cloud app. Access the logs to get more information about the specific error, which can help you diagnose and resolve the issue. You can click on “Manage app” in the lower right of your app to access the logs.

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