Errors
Core Dagster error classes.
All errors thrown by the Dagster framework inherit from DagsterError. Users
should not subclass this base class for their own exceptions.
There is another exception base class, DagsterUserCodeExecutionError, which is
used by the framework in concert with the user_code_error_boundary().
Dagster uses this construct to wrap user code into which it calls. User code can perform arbitrary
computations and may itself throw exceptions. The error boundary catches these user code-generated
exceptions, and then reraises them wrapped in a subclass of
DagsterUserCodeExecutionError.
The wrapped exceptions include additional context for the original exceptions, injected by the Dagster runtime.
exceptiondagster.DagsterError [source]Base class for all errors thrown by the Dagster framework.
Users should not subclass this base class for their own exceptions.
propertyis_user_code_error [source]Returns true if this error is attributable to user code.
exceptiondagster.DagsterConfigMappingFunctionError [source]Indicates that an unexpected error occurred while executing the body of a config mapping function defined in a
JobDefinitionor ~dagster.GraphDefinition during config parsing.
exceptiondagster.DagsterEventLogInvalidForRun [source]Raised when the event logs for a historical run are malformed or invalid.
exceptiondagster.DagsterExecutionStepExecutionError [source]Indicates an error occurred while executing the body of an execution step.
exceptiondagster.DagsterExecutionStepNotFoundError [source]Thrown when the user specifies execution step keys that do not exist.
exceptiondagster.DagsterInvalidConfigError [source]Thrown when provided config is invalid (does not type check against the relevant config schema).
exceptiondagster.DagsterInvalidConfigDefinitionError [source]Indicates that you have attempted to construct a config with an invalid value.
Acceptable values for config types are any of:
-
A Python primitive type that resolves to a Dagster config type (
python:int,python:float,python:bool,python:str, orpython:list). -
A Dagster config type:
Int,Float,Bool,String,StringSource,Any,Array,Noneable,Enum,Selector,Shape, orPermissive. -
A bare python dictionary, which will be automatically wrapped in
Shape. Values of the dictionary are resolved recursively according to the same rules. -
A bare python list of length one which itself is config type. Becomes
Arraywith list element as an argument. -
An instance of
Field.
-
exceptiondagster.DagsterInvalidDefinitionError [source]Indicates that the rules for a definition have been violated by the user.
exceptiondagster.DagsterInvalidSubsetError [source]Indicates that a subset of a pipeline is invalid because either:
- One or more ops in the specified subset do not exist on the job.’
- The subset produces an invalid job.
exceptiondagster.DagsterInvariantViolationError [source]Indicates the user has violated a well-defined invariant that can only be enforced at runtime.
exceptiondagster.DagsterResourceFunctionError [source]Indicates an error occurred while executing the body of the
resource_fnin aResourceDefinitionduring resource initialization.
exceptiondagster.DagsterRunNotFoundError [source]Thrown when a run cannot be found in run storage.
exceptiondagster.DagsterStepOutputNotFoundError [source]Indicates that previous step outputs required for an execution step to proceed are not available.
exceptiondagster.DagsterSubprocessError [source]An exception has occurred in one or more of the child processes dagster manages. This error forwards the message and stack trace for all of the collected errors.
exceptiondagster.DagsterTypeCheckDidNotPass [source]Indicates that a type check failed.
This is raised when
raise_on_errorisTruein calls to the synchronous job and graph execution APIs (e.g. graph.execute_in_process(), job.execute_in_process() – typically within a test), and aDagsterType’s type check fails by returning eitherFalseor an instance ofTypeCheckwhosesuccessmember isFalse.
exceptiondagster.DagsterTypeCheckError [source]Indicates an error in the op type system at runtime. E.g. a op receives an unexpected input, or produces an output that does not match the type of the output definition.
exceptiondagster.DagsterUnknownResourceError [source]Indicates that an unknown resource was accessed in the body of an execution step. May often happen by accessing a resource in the compute function of an op without first supplying the op with the correct required_resource_keys argument.
exceptiondagster.DagsterUnmetExecutorRequirementsError [source]Indicates the resolved executor is incompatible with the state of other systems such as the
DagsterInstanceor system storage configuration.
exceptiondagster.DagsterUserCodeExecutionError [source]This is the base class for any exception that is meant to wrap an
python:Exceptionthrown by user code. It wraps that existing user code. Theoriginal_exc_infoargument to the constructor is meant to be a tuple of the type returned bysys.exc_infoat the call site of the constructor.Users should not subclass this base class for their own exceptions and should instead throw freely from user code. User exceptions will be automatically wrapped and rethrown.
propertyis_user_code_error [source]Returns true if this error is attributable to user code.