Hi all & @Marisa_Smith,
I am a newbie here attempting to make a basic inventory management app using Python.
I was able to deploy the app on streamlit but am getting PermissionError: [Errno 13] Permission denied for the excel file being read and write to store the records.
I am fairly new with all this so please ignore the messy code and any other mistakes I made.
This is the repo:
1 Like
Hey @Utsav_Tripathi,
First, welcome to the Streamlit community!!!
I forked your repo to try your app myself, and actually, I got it up and working, with no changes to the code!
In fact, you can see the app here: https://share.streamlit.io/mesmith027/storemanagement/main/app.py
It seems to work fine and allows me to use the form and read/write to the excel file, which begs the question, what seems to be going wrong when you deploy
Can you do a couple of things for me to help troubleshoot:
- make a list of all the steps that lead up to your error
- Can you take a screenshot of the error you are having?
- Also, can you send me the email you used to set up your sharing account
Happy Streamlit-ing!
Marisa
1 Like
Hello Marisa!
Thank you for such a warm welcome!
As pointed out, the app makes the changes during the run but when I try to access the excel file from GitHub, the values are the same as before as if no changes have been made.
Also, when trying to open the app now I am getting this error again. I think you can recreate it after rebooting? Not sure how it’s happening.
Please refer to the screenshot and the log below.
1 Like
Hey @Utsav_Tripathi,
I’m sorry, I got thrown off by the error! You’re looking to actually update your sales database with new entries and save that correct? Silly me! You can do that and we actually have created tutorials on exactly this, and how to connect to different common databases! The way you have set it up works locally but not once your app is deployed.
Actually, you can find in our Documentation the links on how to connect to a database of your choice
https://docs.streamlit.io/en/stable/tutorial/databases.html
This will make your app work and should eliminate that permission denied error! You can even connect to a public or private google sheet (which could be a simple and fast way to get your app working as you intended!)
Happy Streamlit-ing!
Marisa
1 Like
Hey @Marisa_Smith ,
This is what I was actually looking for. I suspected that there might be some confusion, LOL. Glad it cleared up.
It’s true that it works well locally but I wasn’t sure how it’d work in Streamlit.
I will try the mentioned methods and update!
Thanks a lot.
1 Like