runway.exceptions module

Runway exceptions.

exception runway.exceptions.RunwayError[source]

Bases: Exception

Base class for custom exceptions raised by Runway.

message: str

Error message.

__init__(*args: Any, **kwargs: Any) None[source]

Instantiate class.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.ConfigNotFound[source]

Bases: runway.exceptions.RunwayError

Configuration file could not be found.

__init__(*, looking_for: Optional[List[str]] = None, path: pathlib.Path) None[source]

Instantiate class.

Parameters
  • path – Path where the config file was expected to be found.

  • looking_for – List of file names that were being looked for.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.DockerConnectionRefusedError[source]

Bases: runway.exceptions.RunwayError

Docker connection refused.

This can be caused by a number of reasons:

  • Docker is not installed.

  • Docker service is not running.

  • The current user does not have adequate permissions (e.g. not a member of the docker group).

__init__() None[source]

Instantiate class.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.DockerExecFailedError[source]

Bases: runway.exceptions.RunwayError

Docker failed when trying to execute a command.

This can be used for docker container run, docker container start and docker exec equivalents.

__init__(response: Dict[str, Any]) None[source]

Instantiate class.

Parameters

response – The return value of docker.models.containers.Container.wait(), Docker API’s response as a Python dictionary. This can contain important log information pertinent to troubleshooting that may not streamed.

exit_code: int

The StatusCode returned by Docker.

message: str

Error message.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.FailedLookup[source]

Bases: runway.exceptions.RunwayError

Intermediary Exception to be converted to FailedVariableLookup.

Should be caught by error handling and runway.cfngin.exceptions.FailedVariableLookup raised instead to construct a proper error message.

__init__(lookup: VariableValueLookup, cause: Exception, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters
  • lookup – The variable value lookup that was attempted and resulted in an exception being raised.

  • cause – The exception that was raised.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.FailedVariableLookup[source]

Bases: runway.exceptions.RunwayError

Lookup could not be resolved.

Raised when an exception is raised when trying to resolve a lookup.

__init__(variable: Variable, lookup_error: FailedLookup, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters
  • variable – The variable containing the failed lookup.

  • lookup_error – The exception that was raised directly before this one.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.HclParserError[source]

Bases: runway.exceptions.RunwayError

HCL/HCL2 parser error.

__init__(exc: Exception, file_path: Union[Path, str], parser: Optional[ModuleType] = None) None[source]

Instantiate class.

Parameters
  • exc – Exception that was raised.

  • file_path – File that resulted in the error.

  • parser – The parser what was used to try to parse the file (hcl|hcl2).

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.InvalidLookupConcatenation[source]

Bases: runway.exceptions.RunwayError

Invalid return value for a concatenated (chained) lookup.

The return value must be a string when lookups are concatenated.

__init__(invalid_lookup: VariableValue, concat_lookups: VariableValueConcatenation[Any], *args: Any, **kwargs: Any) None[source]

Instantiate class.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.KubectlVersionNotSpecified[source]

Bases: runway.exceptions.RunwayError

kubectl version is required but was not specified.

Version can be specified by using a file or option.

__init__(*args: Any, **kwargs: Any) None[source]

Instantiate class.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.NpmNotFound[source]

Bases: runway.exceptions.RunwayError

Raised when npm could not be executed or was not found in path.

__init__(*args: Any, **kwargs: Any) None[source]

Instantiate class.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception runway.exceptions.OutputDoesNotExist[source]

Bases: runway.exceptions.RunwayError

Raised when a specific stack output does not exist.

__init__(stack_name: str, output: str, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters
  • stack_name – Name of the stack.

  • output – The output that does not exist.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

stack_name: str

Name of a CloudFormation Stack.

output: str

Name of the CloudFormation Stack’s Output that does not exist.

message: str

Error message.

exception runway.exceptions.RequiredTagNotFoundError[source]

Bases: runway.exceptions.RunwayError

Required tag not found on resource.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__init__(resource: str, tag_key: str) None[source]

Instantiate class.

Parameters
  • resource – An ID or name to identify a resource.

  • tag_key – Key of the tag that could not be found.

resource: str

An ID or name to identify a resource.

tag_key: str

Key of the tag that could not be found.

message: str

Error message.

exception runway.exceptions.UnknownLookupType[source]

Bases: runway.exceptions.RunwayError

Lookup type provided does not match a registered lookup.

Example

If a lookup of ${<lookup_type> query} is used and <lookup_type> is not a registered lookup, this exception will be raised.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__init__(lookup: VariableValueLookup, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters

lookup – Variable value lookup that could not find a handler.

exception runway.exceptions.UnresolvedVariable[source]

Bases: runway.exceptions.RunwayError

Raised when trying to use a variable before it has been resolved.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__init__(variable: Variable, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters

variable – The unresolved variable.

exception runway.exceptions.UnresolvedVariableValue[source]

Bases: runway.exceptions.RunwayError

Intermediary Exception to be converted to UnresolvedVariable.

Should be caught by error handling and runway.cfngin.exceptions.UnresolvedVariable raised instead to construct a proper error message.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__init__(lookup: VariableValueLookup, *args: Any, **kwargs: Any) None[source]

Instantiate class.

Parameters

lookup – The variable value lookup that is not resolved.

exception runway.exceptions.VariablesFileNotFound[source]

Bases: runway.exceptions.RunwayError

Defined variables file could not be found.

__new__(**kwargs)
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

__init__(file_path: pathlib.Path) None[source]

Instantiate class.

Parameters

file_path – Path where the file was expected to be found.