reuse.exceptions module

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

exception reuse.exceptions.ReuseError[source]

Bases: Exception

Base exception.

exception reuse.exceptions.SpdxIdentifierNotFoundError[source]

Bases: ReuseError

Could not find SPDX identifier for license file.

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

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)[source]

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)[source]

Bases: GlobalLicensingParseError, ValueError

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

exception reuse.exceptions.GlobalLicensingConflictError[source]

Bases: ReuseError

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

exception reuse.exceptions.MissingReuseInfoError[source]

Bases: ReuseError

Some REUSE information is missing from the result.

exception reuse.exceptions.CommentError[source]

Bases: ReuseError

An error occurred during an interaction with a comment.

exception reuse.exceptions.CommentCreateError[source]

Bases: CommentError

An error occurred during the creation of a comment.

exception reuse.exceptions.CommentParseError[source]

Bases: CommentError

An error occurred during the parsing of a comment.

exception reuse.exceptions.CopyrightNoticeParseError[source]

Bases: ReuseError

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

exception reuse.exceptions.YearRangeParseError[source]

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[source]

Bases: ReuseError

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