Exceptions

exception vivarium.config_tree.exceptions.ConfigurationError(message, value_name=None)[source]

Base class for configuration errors.

Parameters:
  • message (str) – The error message.

  • value_name (str | None) – The name of the configuration value that caused the error, if applicable.

exception vivarium.config_tree.exceptions.ConfigurationKeyError(message, value_name=None)[source]

Error raised when a configuration lookup fails.

Parameters:
  • message (str)

  • value_name (str | None)

exception vivarium.config_tree.exceptions.MissingLayerError(message, value_name=None)[source]

Error raised when values exist but not at the explicitly-requested layer.

Parameters:
  • message (str)

  • value_name (str | None)

exception vivarium.config_tree.exceptions.ImproperAccessError(message, value_name=None)[source]

Error raised when a configuration value is accessed improperly.

For example, attempting to access keys that look like dunder attributes (starting and ending with __) via dot notation rather than bracket notation.

Parameters:
  • message (str)

  • value_name (str | None)

exception vivarium.config_tree.exceptions.DuplicatedConfigurationError(message, name, layer, source, value)[source]

Error raised when a configuration value is set more than once.

Parameters:
  • message (str)

  • name (str)

  • layer (str | None)

  • source (str | None)

  • value (Any)

layer

The configuration layer at which the value is being set.

source

The original source of the configuration value.

value

The original configuration value.