Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.exceptions package

This module defines Galaxy’s custom exceptions.

A Galaxy exception is an exception that extends MessageException which defines an HTTP status code (represented by the status_code attribute) and a default error message.

New exceptions should be defined by adding an entry to error_codes.json in this directory to define a default error message and a Galaxy “error code”. A concrete Python class should be added in this file defining an HTTP status code (as status_code) and error code (error_code) object loaded dynamically from error_codes.json.

Reflecting Galaxy’s origins as a web application, these exceptions tend to be a bit web-oriented. However this module is a dependency of modules and tools that have nothing to do with the web - keep this in mind when defining exception names and messages.

exception galaxy.exceptions.ActionInputError(err_msg, type='error')[source]

Bases: galaxy.exceptions.MessageException

__init__(err_msg, type='error')[source]
err_code = ErrorCode[code=400008,message=Request contained invalid parameter, action could not be completed.]
status_code = 400
exception galaxy.exceptions.AdminRequiredException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403006,message=Action requires admin account.]
status_code = 403
exception galaxy.exceptions.AuthenticationFailed(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=401001,message=Authentication failed, invalid credentials supplied.]
status_code = 401
exception galaxy.exceptions.AuthenticationRequired(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403001,message=Authentication required for this request]
status_code = 403
exception galaxy.exceptions.ConfigDoesNotAllowException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403004,message=The configuration of this Galaxy instance does not allow that operation]
status_code = 403
exception galaxy.exceptions.ConfigurationError[source]

Bases: Exception

err_code = ErrorCode[code=500003,message=Error in a configuration file.]
status_code = 500
exception galaxy.exceptions.Conflict(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=409001,message=Database conflict prevented fulfilling the request.]
status_code = 409
exception galaxy.exceptions.ContainerCLIError(msg=None, stdout=None, stderr=None, returncode=None, command=None, subprocess_command=None, **kwargs)[source]

Bases: Exception

__init__(msg=None, stdout=None, stderr=None, returncode=None, command=None, subprocess_command=None, **kwargs)[source]
exception galaxy.exceptions.ContainerImageNotFound(msg=None, image=None, **kwargs)[source]

Bases: Exception

__init__(msg=None, image=None, **kwargs)[source]
exception galaxy.exceptions.ContainerNotFound(msg=None, container_id=None, **kwargs)[source]

Bases: Exception

__init__(msg=None, container_id=None, **kwargs)[source]
exception galaxy.exceptions.ContainerRunError(msg=None, image=None, command=None, **kwargs)[source]

Bases: Exception

__init__(msg=None, image=None, command=None, **kwargs)[source]
exception galaxy.exceptions.DeprecatedMethod(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

Method (or a particular form/arg signature) has been removed and won’t be available later

err_code = ErrorCode[code=404002,message=This API method or call signature has been deprecated and is no longer available]
status_code = 404
exception galaxy.exceptions.DuplicatedIdentifierException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400011,message=Request contained a duplicated identifier that must be unique.]
status_code = 400
exception galaxy.exceptions.DuplicatedSlugException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400006,message=Slug must be unique per user.]
status_code = 400
exception galaxy.exceptions.HandlerAssignmentError(msg=None, obj=None, **kwargs)[source]

Bases: Exception

__init__(msg=None, obj=None, **kwargs)[source]
exception galaxy.exceptions.InconsistentDatabase(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=500002,message=Inconsistent database prevented fulfilling the request.]
status_code = 500
exception galaxy.exceptions.InsufficientPermissionsException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403005,message=You don't have proper permissions to perform the requested operation]
status_code = 403
exception galaxy.exceptions.InternalServerError(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=500001,message=Internal server error.]
status_code = 500
exception galaxy.exceptions.InvalidFileFormatError(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=500005,message=File format not supported for this operation.]
status_code = 500
exception galaxy.exceptions.ItemAccessibilityException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403002,message=User cannot access specified item.]
status_code = 403
exception galaxy.exceptions.ItemDeletionException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

exception galaxy.exceptions.ItemOwnershipException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403003,message=User does not own specified item.]
status_code = 403
exception galaxy.exceptions.MalformedContents(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400013,message=The contents of the request are malformed.]
status_code = 400
exception galaxy.exceptions.MalformedId(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400009,message=The id of the resource is malformed.]
status_code = 400
exception galaxy.exceptions.MessageException(err_msg=None, type='info', **extra_error_info)[source]

Bases: Exception

Most generic Galaxy exception - indicates merely that some exceptional condition happened.

__init__(err_msg=None, type='info', **extra_error_info)[source]
err_code = ErrorCode[code=0,message=Unknown error occurred while processing request.]
static from_code(status_code, message)[source]
status_code = 400
exception galaxy.exceptions.NotImplemented(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=501001,message=Method is not implemented.]
status_code = 501
exception galaxy.exceptions.ObjectAttributeInvalidException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400004,message=Attempted to create or update object with invalid attribute value.]
status_code = 400
exception galaxy.exceptions.ObjectAttributeMissingException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400005,message=Attempted to create or update object without required attribute.]
status_code = 400
exception galaxy.exceptions.ObjectInvalid[source]

Bases: Exception

Accessed object store ID is invalid

exception galaxy.exceptions.ObjectNotFound(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

Accessed object was not found

err_code = ErrorCode[code=404001,message=No such object found.]
status_code = 404
exception galaxy.exceptions.RealUserRequiredException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

error_code = ErrorCode[code=400016,message=Only real users can make this request.]
status_code = 400
exception galaxy.exceptions.ReferenceDataError(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=500006,message=Reference data required for program execution failed to load.]
status_code = 500
exception galaxy.exceptions.RequestParameterInvalidException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400008,message=Request contained invalid parameter, action could not be completed.]
status_code = 400
exception galaxy.exceptions.RequestParameterMissingException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400007,message=Request is missing parameter required to complete desired action.]
status_code = 400
exception galaxy.exceptions.ServerNotConfiguredForRequest(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=501002,message=Server not configured for the request. The Galaxy admin may be able to resolve the problem by installing additional dependencies or setting up new infrastructure.]
status_code = 501
exception galaxy.exceptions.ToolExecutionError(err_msg, type='error', job=None)[source]

Bases: galaxy.exceptions.MessageException

__init__(err_msg, type='error', job=None)[source]
err_code = ErrorCode[code=500004,message=Tool execution failed due to an internal server error.]
status_code = 500
exception galaxy.exceptions.ToolInputsNotReadyException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

error_code = ErrorCode[code=400015,message=Tool inputs not yet ready, try again later.]
status_code = 400
exception galaxy.exceptions.ToolMetaParameterException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400012,message=Supplied incorrect or incompatible tool meta parameters.]
status_code = 400
exception galaxy.exceptions.ToolMissingException(err_msg=None, type='info', tool_id=None, **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

__init__(err_msg=None, type='info', tool_id=None, **extra_error_info)[source]
err_code = ErrorCode[code=400014,message=Tool could not be found.]
status_code = 400
exception galaxy.exceptions.UnknownContentsType(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400010,message=The request contains unknown type of contents.]
status_code = 400
exception galaxy.exceptions.UserActivationRequiredException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=403007,message=Action requires account activation.]
status_code = 403
exception galaxy.exceptions.UserCannotRunAsException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400001,message=User does not have permissions to run jobs as another user.]
status_code = 403
exception galaxy.exceptions.UserInvalidRunAsException(err_msg=None, type='info', **extra_error_info)[source]

Bases: galaxy.exceptions.MessageException

err_code = ErrorCode[code=400002,message=Invalid run_as request - run_as user does not exist.]
status_code = 400

Submodules

galaxy.exceptions.error_codes module

Defines the ErrorCode class and instantiates concrete objects from JSON.

See the file error_codes.json for actual error code descriptions.

class galaxy.exceptions.error_codes.ErrorCode(code, default_error_message)[source]

Bases: object

Small class allowing object representation for error descriptions loaded from JSON.

__init__(code, default_error_message)[source]

Construct a ErrorCode from supplied integer and error message.