Certainly, here’s a formulated error message that you can use to report the issue to Streamlit support:
I’m encountering an issue when deploying my Streamlit app on Streamlit Cloud. The app runs without errors on my local machine, but I’m encountering the following error when running it on Streamlit Cloud:
File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/script_runner.py”, line 354, in _run_script
File “/mount/src/whatsapp-chats-analyzer-app/chatsanalyzer.py”, line 393, in
time_counts[‘time’] = time_counts[‘time’].astype(str)
File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/core/frame.py”, line 3896, in getitem
indexer = self.columns.get_loc(key)
File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/core/indexes/base.py”, line 3797, in get_loc
raise KeyError(key) from err
Description: I have developed a Streamlit app for WhatsApp chat analysis, and it works perfectly on my local machine. However, when deploying the app on Streamlit Cloud, I encountered the above error. It appears to be related to a pandas DataFrame operation involving the ‘time’ column.
Steps to Reproduce:
- Upload the WhatsApp chat data.
- Run the Streamlit app on Streamlit Cloud.
Expected Outcome: The app should run without errors on Streamlit Cloud, just like it does on my local machine.
Actual Outcome: I encountered the error mentioned above when running the app on Streamlit Cloud.
- The app is developed using Python and relies on the Streamlit and pandas libraries.
- The ‘time’ column in the DataFrame is in 24-hour format.
- The app runs smoothly on my local machine but encounters this issue on Streamlit Cloud.
I would appreciate your assistance in resolving this issue so that I can successfully deploy my app on Streamlit Cloud. Thank you for your support.