Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku - Process exited with status 255

I am new to heroku The app is in python 3.7, and uses streamlit, bokeh and pandas I have deployed a python streamlit app successfully, but when I try to open it I get the following error. I cannot understand the 255 error and the line:

Found invalid character in key name: '['. Try quoting the key name.

I will be glad if someone can help. Here is the log file:

C:\Users\imall\Desktop\projects\app>heroku logs --tail
2020-06-05T17:31:11.476321+00:00 app[api]: Release v1 created by user [email protected]
2020-06-05T17:31:11.476321+00:00 app[api]: Initial release by user [email protected]
2020-06-05T17:31:11.710688+00:00 app[api]: Release v2 created by user [email protected]
2020-06-05T17:31:11.710688+00:00 app[api]: Enable Logplex by user [email protected]
2020-06-05T17:31:44.000000+00:00 app[api]: Build started by user [email protected]
2020-06-05T17:33:09.232663+00:00 app[api]: Release v3 created by user [email protected]
2020-06-05T17:33:09.232663+00:00 app[api]: Deploy 5e76f3fe by user [email protected]
2020-06-05T17:33:09.252408+00:00 app[api]: Scaled to web@1:Free by user [email protected]
2020-06-05T17:33:18.820397+00:00 heroku[web.1]: Starting process with command `sh setup.sh && streamlit run dvh-app2.py`2020-06-05T17:33:26.600593+00:00 app[web.1]: Found invalid character in key name: '['. Try quoting the key name. (line 1 column 2 char 1)
2020-06-05T17:33:26.896489+00:00 heroku[web.1]: Process exited with status 255
2020-06-05T17:33:26.948655+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-05T17:33:26.950770+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-05T17:33:28.000000+00:00 app[api]: Build succeeded
2020-06-05T17:33:34.441164+00:00 heroku[web.1]: Starting process with command `sh setup.sh && streamlit run dvh-app2.py`2020-06-05T17:33:37.916979+00:00 app[web.1]: Found invalid character in key name: '['. Try quoting the key name. (line 1 column 2 char 1)
2020-06-05T17:33:38.070801+00:00 heroku[web.1]: Process exited with status 255
2020-06-05T17:33:38.122656+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-05T17:34:17.202049+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=young-fjord-43109.herokuapp.com request_id=0bc3422d-0718-4741-a062-dcd941990312 fwd="110.227.109.220" dyno= connect= service= status=503 bytes= protocol=https
2020-06-05T17:34:18.031087+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=young-fjord-43109.herokuapp.com request_id=c480e478-484c-417a-8b31-5a6c42128b6f fwd="110.227.109.220" dyno= connect= service= status=503 bytes= protocol=https

My setup.sh file is as follows:

mkdir -p ~/.streamlit/

echo “\
[general]\n\
email = \”[email protected]\”\n\
“ > ~/.streamlit/credentials.toml

echo “\
[server]\n\
headless = true\n\
enableCORS=false\n\
port = $PORT\n\
“ > ~/.streamlit/config.toml

My Procfile is as follows:

sh setup.sh && streamlit run dvh-app2.py

My requirements.txt file is as follows:

streamlit==0.49.0
bokeh==2.0.1
pandas==0.24.2
numpy==1.17.3
like image 866
Indranil Mallick Avatar asked Jan 26 '23 00:01

Indranil Mallick


1 Answers

OK I figured this out myself: The problem was with my setup.sh file. After reformatting it like this:

mkdir -p ~/.streamlit

echo "[server]
headless = true
port = $PORT
enableCORS = false
" > ~/.streamlit/config.toml

It worked without any problems.

like image 108
Indranil Mallick Avatar answered Jan 28 '23 13:01

Indranil Mallick