Describe the bug
The case-insensitive lookup of data might fail in Dynaconf 3.10 and Dynaconf 3.11 if the config name contains spaces.
To Reproduce
Steps to reproduce the behavior:
-
Having the following folder structure
Project structure
.
├── config.yaml
└── test.py
0 directories, 2 files
-
Having the following config file:
Config file
config.yaml
-
Having the following app code:
Code
test.py
from pathlib import Path
from dynaconf import Dynaconf
if __name__ == '__main__':
settings = Dynaconf(
settings_file=[Path(__file__).parent.joinpath('config.yaml')])
print(settings.root.branch_node)
-
Executing under the following environment
Execution
Expected behavior
The command should produce the following output:
and exit with a zero exit code.
Actual behavior
The script fails:
Traceback (most recent call last):
File "/Users/rene/Downloads/test.py", line 8, in <module>
print(settings.root.branch_node)
File "/Users/rene/.pyenv/versions/3.10.6/lib/python3.10/site-packages/dynaconf/utils/boxing.py", line 18, in evaluate
value = f(dynabox, item, *args, **kwargs)
File "/Users/rene/.pyenv/versions/3.10.6/lib/python3.10/site-packages/dynaconf/utils/boxing.py", line 41, in __getattr__
return super().__getattr__(n_item, *args, **kwargs)
File "/Users/rene/.pyenv/versions/3.10.6/lib/python3.10/site-packages/dynaconf/vendor/box/box.py", line 175, in __getattr__
raise BoxKeyError(str(E)) from _A
dynaconf.vendor.box.exceptions.BoxKeyError: "'DynaBox' object has no attribute 'branch_node'"
with exit code 1. If I install Dynaconf 3.1.9
pip install dynaconf==3.1.9
everything works as expected.
Environment:
- OS: macOS
12.6
- Dynaconf Version:
3.1.11
Describe the bug
The case-insensitive lookup of data might fail in Dynaconf
3.10and Dynaconf3.11if the config name contains spaces.To Reproduce
Steps to reproduce the behavior:
Having the following folder structure
Project structure
Having the following config file:
Config file
config.yaml
Having the following app code:
Code
test.py
Executing under the following environment
Execution
python3 test.pyExpected behavior
The command should produce the following output:
and exit with a zero exit code.
Actual behavior
The script fails:
with exit code
1. If I install Dynaconf3.1.9everything works as expected.
Environment:
12.63.1.11