Dear @gabe_maldonado, can you share your steps for deploying to heroku? I’m quite new to deployment, i apologize. Currently I just tried out two hours trying to deploy on heroku and i’m facing the following issues in the logs for a very simple app that is only reading data from a .csv file (yes really nth else, not even charts yet).
With some googling, i fixed it by incorporating a Procfile with the following: web: gunicorn website.wsgi --log-file -
Second Issue from herokulogs --tail: ModuleNotFound: No module named 'app'
I don’t understand what is the proper folder structure or configuration that I’m missing out for deployment. Pls help! I’ve tested the streamlit locally its awesome but if I can’t deploy it then there is no real benefit for me to use Streamlit over just using jupyter notebook
Hey there @lyqht seems like you’re making some progress. I am making the assumption that you have git and heroku cli already configured in your machine so you’re good to go there.
The way that I made it work is as follows:
Used VSCode
Created a virtual env and installed all required packages
Created an app.py file where I coded the sample app.
Once the app was running fine on my local machine I went ahead and deployed by:
Freezing requirements and creating a requirements.txt file
Thanks for the writeup for the steps you have done! I have followed your steps to create a Procfile and setup.sh. I have to restart the dynos a few times to get it to run on the new Procfile as well
Are you sure your setup.sh is running?
I would try to echo $PORT on the setup.sh and then check the logs to compare it with the port that streamlit is binded to.
Thank you! I got it to deploy onto heroku now!
I see that my file is missing the \n after the enableCORS=false, but somehow it works for @gabe_maldonado?
You were missing the line break but you were also redirecting to the wrong config file (./.streamlit.config.toml). I’m not sure but probably @gabe_maldonado’s solution was inspired by my initial post here, which also has the line break.
Glad you got it to work, @lyqht. I bet it felt awesome!
My file is missing the \n but somehow it works without throwing any errors. And thanks to @Alexandre_Domingues as well for helping out.
Thank You gabe_maldonado.
I was also getting the same error “h14” after deployment then I just added setup.sh & Procfile as you mentioned Its worked for me. Now running my streamlit app in heroku
I can already picture the command: > streamlit hk-deploy
This would do just a few things: check that one is logged into heroku, that there is a requirements.txt, setup.sh and Procfile, then doing the right git push. If any of the required things are missing, sending them to the heroku tutorial. Of course I only just looked at the heroku tutorial for the first time 5 minutes ago, but subprocess should be able to do that work if the needed files are all in place.
I really need to deploy my streamlit application, I have requested an invite. Is there any chance to assist me or to explain how to deploy on pythonanyware.
Was this a past situation? Since Streamlit gave me permission to deploy the app in GITHUB, so not sure what is going on?
I did got an error trying to deploy, is said, unable to set Github listener. Can you help me with that.
Hey @argira, this looks like a bug. I’m sending this thread to our eng team and we’ll get back to you ASAP. Given that it’s the weekend, though, the earliest you can expect is Monday.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.