Unable to run streamlit

I am getting below error, please help
Traceback (most recent call last):
File “/home/ubuntu/.local/bin/streamlit”, line 5, in
from streamlit.cli import main
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/init.py”, line 102, in
from streamlit.DeltaGenerator import DeltaGenerator as _DeltaGenerator
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/DeltaGenerator.py”, line 27, in
from streamlit import caching
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/caching.py”, line 39, in
from streamlit.hashing import Context
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/hashing.py”, line 40, in
from streamlit.folder_black_list import FolderBlackList
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/folder_black_list.py”, line 38, in
if config.get_option(“global.developmentMode”):
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/config.py”, line 89, in get_option
parse_config_file()
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/config.py”, line 887, in parse_config_file
_update_config_with_toml(file_contents, filename)
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/config.py”, line 817, in _update_config_with_toml
where_defined,
File “/home/ubuntu/.local/lib/python3.5/site-packages/streamlit/config.py”, line 794, in _set_option
assert key in _config_options, ‘Key “%s” is not defined.’ % key
AssertionError: Key “theme.backgroundColor” is not defined.

Hey @amit_kumar_thakur

Welcome to the Streamlit community :tada:: streamlit:

Currently streamlit supports Python >=3.6 but you are using Python 3.5. Consider upgrading it and it should work fine afterwards.

Also on streamlit cloud the Python versions that are available are 3.7, 3.8 and 3.9 so I would suggest using one of those as it would increase the chances of your app running fine on the cloud as well.

Best,
Kanak

1 Like

Adding to @Kanak 's answer…I suspect the issue is that the last time Streamlit supported Python 3.5, the themeing functionality wasn’t available. So when you install Streamlit, it installs an older version. Upgrading to Python >= 3.6 and validating a more recent version of Streamlit (> 1.0) should make things work correctly.

Best,
Randy

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.