Closed lundybernard closed 2 years ago
This is improved in v1.3, It now raises a warning about the missing config file, and the application runs successfully.
However, if the config file is missing, and the config value is not found in any source, It will raise the same AttributeError: 'str' object has no attribute 'get'
Exception, instead of the helpful missing-value message which tells you what value is missing, ex: please add PROJECT_CONFIG_ITEM to ENV
etc.
missing config items should raise the helpful missing value message even if a config file is not specified.
When a FileConfig source is included in the Configuration source_list, but a file is not provided by the user, or found during FileConfig.init, looking up an attribute throws the following error.
FIX: missing keys in the config file should return
None
, not raise an AttributeError. If the file is missing all FileConfig.get should always return None