I get the following error when trying to deploy the app via streamlit.
here is my github repo
First, welcome to the Streamlit community
Did you by chance have this app running locally and hit the deploy button from the hamburger menu?
I ask because I see that your error has “sl2902/kaggle.git branch ‘main’” at the end of the message.
I have found that if you remove the “.git” from the app dashboard it usually works.
Let me know if this works for you,
I also got some error@Marisa_Smith
Yes, I deployed it via the streamlit app. Is there a better way of doing this?
After removing “.git” from the repo path, I was able to deploy the app. However, I ran into another error
The error message appears obvious, but I cannot seem to figure out why the app is unable to locate the file, which otherwise runs fine locally
FileNotFoundError: [Errno 2] No such file or directory: ‘/app/kaggle/input/learnplatform-covid19-impact-on-digital-learning/districts_info.csv’
In the repo, the script is under the covid19 folder, and I access the path like so
path = os.path.join(os.getcwd(), “input/learnplatform-covid19-impact-on-digital-learning/”)
The “input” folder is under “covid19” directory; it is missing the “covid19” folder when it runs the above command for some reason. Any idea what I am missing here?
So when you launch your streamlit app on the cloud, it runs it from the top directory of Github.
Based on that path
‘/app/kaggle/input/learnplatform-covid19-impact-on-digital-learning/districts_info.csv’, locally you have your Git repo in a top folder called
app/ with a slightly different structure/directory names.
However, on your GitHub the directories are:
You need to change the path to align with the directory structure of your remote GitHub repo not your local one.
This is my directory structure locally
│ └── learnplatform-covid19-impact-on-digital-learning
│ ├── README.md
│ ├── districts_info.csv
│ ├── engagement_data
│ │ ├── 1000.csv
│ │ ├── 1039.csv
│ │ ├── 1044.csv
│ │ ├── 1052.csv
| | |__ …
│ └── products_info.csv
app/ doesn’t exist.
For some reason, os.get_cwd() skips “covid/” folder, and returns “/kaggle/input/learnplatform-covid19-imact-on-digital-learning”, which returns a “File not found error”. Since the streamlit_app.py is in the “covid19/” folder, shouldn’t it return - “/kaggle/covid19/input/learnplatform-covid19-imact-on-digital-learning”?
I am getting below errors. if anyone could help, I appreciate.
PermissionError: 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. Traceback: File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 354, in _run_script exec(code, module.__dict__)File "/app/master_thesis/streamlit_appcopy.py", line 181, in <module> load_feedback_form()File "/app/master_thesis/streamlit_appcopy.py", line 179, in load_feedback_form df.append(df2, ignore_index=True).to_csv("data/j.csv", index=False)File "/home/appuser/venv/lib/python3.7/site-packages/pandas/core/generic.py", line 3482, in to_csv storage_options=storage_options,File "/home/appuser/venv/lib/python3.7/site-packages/pandas/io/formats/format.py", line 1105, in to_csv csv_formatter.save()File "/home/appuser/venv/lib/python3.7/site-packages/pandas/io/formats/csvs.py", line 243, in save storage_options=self.storage_options,File "/home/appuser/venv/lib/python3.7/site-packages/pandas/io/common.py", line 706, in get_handle newline="",
Please do not copy-paste the same message onto multiple threads. There are at least 3 copies of this, the same people all see the same postings.
yes you are right @randyzwitch, but I am trying to get any suggestion or hint from Streamlit community.
This isn’t a “yes, but” situation. Please stop doing it, whatever the rationale.
yes got it, I am very thankful for your reply