-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
from simple_toml_configurator import Configuration
default_config = {
'example': 'example-argument',
}
settings = Configuration(defaults=default_config, config_file_name="config")
print(settings.example)This fails with the following error:
Traceback (most recent call last):
File "./backup.py", line 11, in <module>
settings = Configuration(defaults=default_config, config_file_name="config")
File "./.venv/lib/python3.13/site-packages/simple_toml_configurator/toml_configurator.py", line 106, in __init__
self.init_config(*args, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "./.venv/lib/python3.13/site-packages/simple_toml_configurator/toml_configurator.py", line 160, in init_config
self._set_os_env()
~~~~~~~~~~~~~~~~^^
File "./.venv/lib/python3.13/site-packages/simple_toml_configurator/toml_configurator.py", line 342, in _set_os_env
for key, value in self.config[table].items():
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'String' object has no attribute 'items'
The TOML file looks like this, which is valid TOML according to https://www.toml-lint.com/:
example = "example-argument"
_set_os_env expects every top-level key to be a table and fails if it is a string or anything else.
Metadata
Metadata
Assignees
Labels
No labels