If you’re creating a debugging post, please include the following info:
- Are you running your app locally or is it deployed?
- If your app is deployed:
a. Is it deployed on Community Cloud or another hosting platform?
b. Share the link to the public deployed app. - Share the link to your app’s public GitHub repository (including a requirements file).
- Share the full text of the error message (not a screenshot).
- Share the Streamlit and Python versions.
def _update_config_with_toml(raw_toml: str, where_defined: str) → None:
“”"Update the config system by parsing this string.
This should only be called from get_config_options.
Parameters
----------
raw_toml : str
The TOML file to parse to update the config values.
where_defined : str
Tells the config system where this was set.
"""
import toml
parsed_config_file = toml.loads(raw_toml)
for section, options in parsed_config_file.items():
if isinstance(options, dict):
for name, value in options.items():
value = _maybe_read_env_variable(value)
_set_option(f"{section}.{name}", value, where_defined)
else:
# Handle the case where the 'options' is not a dictionary
print(f"Skipping section '{section}' as it is not a dictionary: {options}")