neoscore.core.exceptions

All custom exceptions used throughout neoscore.

exception neoscore.core.exceptions.MusicFontMetadataNotFoundError[source]

Bases: Exception

Exception raised when metadata for a music font can’t be found.

exception neoscore.core.exceptions.MusicFontGlyphNotFoundError[source]

Bases: Exception

Exception raised when a glyph cannot be found in a MusicFont

__init__(glyph_name: str, alternate_number: Optional[int])[source]
exception neoscore.core.exceptions.NoClefError[source]

Bases: Exception

Exception raised when no clef is present in a Staff where needed

exception neoscore.core.exceptions.NoAncestorStaffError[source]

Bases: Exception

Exception raised when a StaffObject does not have an ancestor Staff

exception neoscore.core.exceptions.DynamicStringError[source]

Bases: Exception

Exception raised when a dynamic string cannot be parsed.

__init__(string, character)[source]
exception neoscore.core.exceptions.NoFlagNeededError[source]

Bases: Exception

Exception raised when a Flag is created with a non-flaggable duration

__init__(duration)[source]
exception neoscore.core.exceptions.FontRegistrationError[source]

Bases: Exception

Exception raised when a font is loaded from disk unsuccessfully.

__init__(font_file_path, detail=None)[source]
Parameters
  • font_file_path (str) – The path to the font file which could not be registered.

  • detail (str) – Optional error details.

exception neoscore.core.exceptions.UnknownFontFamilyError[source]

Bases: Exception

Exception raised when an invalid font name is passed to a FontInterface.

exception neoscore.core.exceptions.ColorBoundsError[source]

Bases: Exception

Exception raised when a color channel is set out of bounds

__init__(value: int)[source]
exception neoscore.core.exceptions.InvalidIntervalError[source]

Bases: Exception

An exception raised when an invalid interval specifier is used.

exception neoscore.core.exceptions.InvalidPitchDescriptionError[source]

Bases: Exception

An exception raised when an invalid pitch specifier is used.

exception neoscore.core.exceptions.InvalidImageFormatError[source]

Bases: Exception

Raised when an image format cannot be determined.

exception neoscore.core.exceptions.ImageExportError[source]

Bases: Exception

Raised when low level image export fails.

exception neoscore.core.exceptions.NoAncestorWithMusicFontError[source]

Bases: Exception

Raised when a lookup expecting to find an ancestor with a MusicFont fails.

exception neoscore.core.exceptions.ImageLoadingError[source]

Bases: Exception

Raised when an image cannot be loaded