reuse.exceptions module - reuse 6.1.2 documentation

Skip to content
Back to top
View this page

# reuse.exceptions module

All exceptions owned by `reuse`. These exceptions all inherit `ReuseError`.

exception reuse.exceptions.ReuseError

  Bases: `Exception`

  Base exception.

exception reuse.exceptions.SpdxIdentifierNotFoundError

  Bases: `ReuseError`

  Could not find SPDX identifier for license file.

exception reuse.exceptions.GlobalLicensingParseError(*args: Any, source: str | None = None)

  Bases: `ReuseError`

  An exception representing any kind of error that occurs when trying to parse a `reuse.global_licensing.GlobalLicensing` file.

exception reuse.exceptions.GlobalLicensingParseTypeError(*args: Any, source: str | None = None)

  Bases: `GlobalLicensingParseError`, `TypeError`

  An exception representing a type error while trying to parse a `reuse.global_licensing.GlobalLicensing` file.

exception reuse.exceptions.GlobalLicensingParseValueError(*args: Any, source: str | None = None)

  Bases: `GlobalLicensingParseError`, `ValueError`

  An exception representing a value error while trying to parse a `reuse.global_licensing.GlobalLicensing` file.

exception reuse.exceptions.GlobalLicensingConflictError

  Bases: `ReuseError`

  There are two global licensing files in the project that are not compatible.

exception reuse.exceptions.MissingReuseInfoError

  Bases: `ReuseError`

  Some REUSE information is missing from the result.

exception reuse.exceptions.CommentError

  Bases: `ReuseError`

  An error occurred during an interaction with a comment.

exception reuse.exceptions.CommentCreateError

  Bases: `CommentError`

  An error occurred during the creation of a comment.

exception reuse.exceptions.CommentParseError

  Bases: `CommentError`

  An error occurred during the parsing of a comment.

exception reuse.exceptions.CopyrightNoticeParseError

  Bases: `ReuseError`

  Error for parsing a `reuse.copyright.CopyrightNotice` from a string.

exception reuse.exceptions.YearRangeParseError

  Bases: `CopyrightNoticeParseError`

  Error for parsing a `reuse.copyright.YearRange` from a string. Because a year range is typically a constituent part of a copyright notice, this error is a subclass of `CopyrightNoticeParseError`.

exception reuse.exceptions.NoEncodingModuleError

  Bases: `ReuseError`

  No module that can detect the encoding of a file is importable.