Common errors and status codes for the easel and hmmer modules.


exception pyhmmer.errors.AllocationError(MemoryError)

A memory error that is caused by an unsuccessful allocation.

__init__(ctype, itemsize, count=1)


exception pyhmmer.errors.UnexpectedError(RuntimeError)

An unexpected error that happened in the C code.

As a user of this library, you should never see this exception being raised. If you do, please open an issue with steps to reproduce on the bug tracker, so that proper error handling can be added to the relevant part of the bindings.

__init__(code, function)


exception pyhmmer.errors.EaselError(RuntimeError)

An error that was raised from the Easel code.

__init__(code, message)


exception pyhmmer.errors.AlphabetMismatch(ValueError)

A value error caused by an alphabet mismatch.

This error is raised on occasions where several arguments to a function have mismatching alphabets. For instance, passing a DigitalSequence to a Builder with different alphabets:

>>> seq = easel.DigitalSequence(easel.Alphabet.dna())
>>> builder = plan7.Builder(easel.Alphabet.amino())
>>>, plan7.Background(seq.alphabet))
Traceback (most recent call last):
pyhmmer.errors.AlphabetMismatch: Expected ..., found ...

New in version 0.3.0.

__init__(expected, actual)


exception pyhmmer.errors.ServerError(RuntimeError)

A runtime error that happened in a hmmpgmd server.

__init__(code, message)


exception pyhmmer.errors.MissingCutoffs(ValueError)

The model is missing bitscore cutoffs required by the pipeline.

New in version 0.8.2.


exception pyhmmer.errors.InvalidParameter(ValueError)

An invalid parameter value was given.

New in version 0.8.2.

__init__(name, value, *, choices=None, hint=None)


exception pyhmmer.errors.InvalidHMM(ValueError)

A value error caused by a HMM that fails validation.

New in version 0.10.3.

__init__(hmm, message)