For Mac Users,
I came across this error while trying to deploy my app using Heroku.
so one way to solve this is by removing the config.toml file completely as most of the comments in the comment section suggest. Don’t worry about finding the config.toml file if you are planning to just delete it.
just open terminal execute these commands -

streamlit config show > ~/.streamlit/config.toml
rm -i ~/.streamlit/config.toml

what this will do is completly remove the config.toml file
next, test it using the command streamlit hello and things should be back to normal.