Hi guys,
I am having problems with serving my app in a browser. I deployed it successfully with Heroku CLI but keep getting the message below on my browser.
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs –tail
Hi @maxpumperla thank you for your response.
here it is,
2020-04-18T14:43:53.000000+00:00 app[api]: Build started by user brunovinicius154@gmail.com
2020-04-18T14:45:21.643947+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-18T14:45:21.406811+00:00 app[api]: Deploy a01a64c4 by user brunovinicius154@gmail.com
2020-04-18T14:45:21.406811+00:00 app[api]: Release v5 created by user brunovinicius154@gmail.com
2020-04-18T14:45:34.000000+00:00 app[api]: Build succeeded
2020-04-18T14:45:45.295290+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-18T14:45:45.299142+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-18T14:45:45.222934+00:00 app[web.1]: bash: streamlit: command not found
2020-04-18T14:46:02.460972+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-18T14:46:02.371569+00:00 app[web.1]: bash: streamlit: command not found
2020-04-18T14:46:03.984589+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/" host=wineclassifierapp.herokuapp.com request_id=0be796fb-8704-4299-a5a9-f4e90bd3be89 fwd=“187.65.211.112” dyno= connect= service= status=503 bytes= protocol=https
2020-04-18T14:46:18.159207+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/" host=wineclassifierapp.herokuapp.com request_id=3616016c-7cf2-422b-80d8-f53048ecef9a fwd=“187.65.211.112” dyno= connect= service= status=503 bytes= protocol=https
2020-04-18T14:46:18.355354+00:00 heroku[router]: at=error code=H10 desc=“App crashed”
The problem is that streamlit is not installed on heroku, hence you get bash: streamlit: command not found. this is easy to spot (and pretty much the way you debug all such traces): you find the interesting stuff between the general heroku app logs and the low-level error messages.
My spidey senses tell me that you do not have a requirements.txt with streamlit in it.
Hi Andrew thank you for your help!
I tried here and issue persists below the logs any help would be very much appreciated.
Thanks in advance
2020-07-15T23:29:28.581628+00:00 heroku[web.1]: State changed from crashed to starting
2020-07-15T23:29:43.779599+00:00 heroku[web.1]: Starting process with command sh setup.sh && streamlit run app.py
2020-07-15T23:29:45.509872+00:00 app[web.1]: bash: streamlit: command not found
2020-07-15T23:29:45.552896+00:00 heroku[web.1]: Process exited with status 127
2020-07-15T23:29:45.595014+00:00 heroku[web.1]: State changed from starting to crashed
2020-07-15T23:40:01.798465+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path="/" host=wineclassifierapp.herokuapp.com request_id=61692443-9062-4bc6-a647-bb7c555cd90d fwd=“191.191.117.89” dyno= connect= service= status=503 bytes= protocol=https
@Andrew_Ng, i will check your files but i already have others apps deployed even more complex than this one(code wise at least). I just cant understand what is going wrong here, maybe something related to the pickle that i use to load the model.
I think pickle should be fine since it’s based on python if jobslib it’s more sensitive, scikit-learn version need to be similar. versioning window for scikit is smaller than pickle.
I’ve included Streamlit in my reqs and my setup.sh file is the same as @Andrew_Ng
I am a Junior Data Scientist trying to gain some skills in the Machine Learning Engineering field so Developer and Stack knowledge are that of a beginner so I apologise for any basics I may be overlooking
Can you provide the repo, please?
If you are using fastai and deploy it through Heroku, it’s better to use the wheel file path for torch. Otherwise, it’ll exceed the slug size.
I came up with the same issue (bash: streamlit: command not found). For me, I solved it after writing a file called runtime.txt in root folder specifying the specific version of Python to install (besides following the requirements.txt to install required versions of packages). I solve the issue by writing the single line of text in the “runtime.txt” file:
As heroku said here: Specifying a Python Runtime | Heroku Dev Center
It is likely that 3.9.4 version is preferred by heroku. The problem here might be: whether bash can tell the correct version of python (with required packages) when running shell program.