dlt.common.configuration.exceptions
LookupTraces Objects
class LookupTraces(NamedTuple)
A set of traces generated by embedded config, recursive
spec_name
type name of the configuration
resolved_fields_set
list of resolved fields, excluding default values
union_count
Position and total count if union of configs
traces
Dict of value traces or embedded config traces
ContainerException Objects
class ContainerException(DltException)
base exception for all exceptions related to injectable container
ConfigFieldMissingException Objects
class ConfigFieldMissingException(KeyError, ConfigurationException)
raises when not all required config fields are present
attrs
def attrs() -> Dict[str, Any]
Get exception attrs with flattened traces and trace values removed
was_partially_resolved
def was_partially_resolved(key: str) -> bool
Checks traces if key was partially resolved
drop_traces_for_field
def drop_traces_for_field(key: str) -> None
Removes traces for key
so they are not displayed
get_run_context_warning
def get_run_context_warning(main_module_path: str) -> str
Generates additional warnings when config resolution failed. There are two typical reasons (except genuine missing configurations):
main_module_path
differs from current run_dir sodlt
does not find related .dlt folder with settings- command line was used but pipeline script hardcodes config and secrets
UnmatchedConfigHintResolversException Objects
class UnmatchedConfigHintResolversException(ConfigurationException)
Raised when using @resolve_type
on a field that doesn't exist in the spec
FinalConfigFieldException Objects
class FinalConfigFieldException(ConfigurationException)
rises when field was annotated as final ie Final[str] and the value is modified by config provider
ConfigValueCannotBeCoercedException Objects
class ConfigValueCannotBeCoercedException(ConfigurationValueError)
raises when value returned by config provider cannot be coerced to hinted type
ConfigFileNotFoundException Objects
class ConfigFileNotFoundException(ConfigurationException)
thrown when configuration file cannot be found in config folder
ConfigFieldMissingTypeHintException Objects
class ConfigFieldMissingTypeHintException(ConfigurationException)
thrown when configuration specification does not have type hint
ConfigFieldTypeHintNotSupported Objects
class ConfigFieldTypeHintNotSupported(ConfigurationException)
thrown when configuration specification uses not supported type in hint