Errors

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

AllocationError

exception pyhmmer.errors.AllocationError(MemoryError)

A memory error that is caused by an unsuccessful allocation.

UnexpectedError

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.

EaselError

exception pyhmmer.errors.EaselError(RuntimeError)

An error that was raised from the Easel code.

AlphabetMismatch

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())
>>> builder.build(seq, plan7.Background(seq.alphabet))
Traceback (most recent call last):
  ...
pyhmmer.errors.AlphabetMismatch: Expected ..., found ...

New in version 0.3.0.