TomlDecodeError: Key name found without value. Reached end of line When deploying on Heroku

Hi all,

I’m getting the above error message when I deploy streamlit to Heroku. I’m working with several people on this. On my computer (Windows 10), if I delete the config.toml file the issue goes away. However, for other people I am working with it does not solve the issue.

Here is the setup.sh:

mkdir -p ~/.streamlit/
echo "\
[general]\n\
email = \"myemailgmail.com\"\n\
" > ~/.streamlit/credentials.toml
echo "\
[server]\n\
headless = true\n\
enableCORS=false\n\
port = $PORT\n\
" > ~/.streamlit/config.toml

Procfile looks like this:

web: sh setup.sh && streamlit run app.py

Specifying streamlit == 0.67.0 in the requirements.txt file.

I regularly get this issue when working with Heroku, and the issue has always been solved by deleting the config file. No idea why all of a suddent that does not suffice now for some other people. Help is much appreciated. Thank you.

try to add code as below to run your app:
streamlit run app.py --server.port 8888

Do you mean in the Procfile?

you can use a specific port to run your python program through add --server.port 8888 without use config.toml
so two lines as below can be removed from your code
port = $PORT\n
" > ~/.streamlit/config.toml

Sadly, this does not seem to be working. Any other suggestions?

Hello,

Just checking on this. I had several people try this by removing the lines in the setup.sh file as well as adding the --server.port 8888 and we are still getting the same error message.

I’ve also asked this question on Stack overflow without a response: streamlit - TomlDecodeError: Key name found without value. Reached end of line When deploying on Heroku - Stack Overflow. Seems like I’m stuck :frowning:

Hi I’m also facing this issue ,
did you get this issue resolved?