Errors#

Exceptions raised by modsmith. All of them derive from ModsmithError.

exception Cancelled#

Bases: ModsmithError

A CancelToken stopped the operation. It can be run again later.

exception DownloadError(
message: str,
failures: Sequence[str] = (),
)#

Bases: ModsmithError

One or more downloads failed.

Parameters:
  • message (str) – A summary of the failure.

  • failures (Sequence[str]) – A reason for each file that failed.

failures#

A reason for each file that failed.

exception InstanceError#

Bases: ModsmithError

A game instance could not be read or changed.

exception IntegrityError#

Bases: ModsmithError

A file does not match its expected size or hash.

exception JavaError#

Bases: ModsmithError

A Java runtime could not be found or installed.

exception LauncherError#

Bases: ModsmithError

The launcher profile data could not be used.

exception LoaderError#

Bases: ModsmithError

A mod loader could not be installed.

exception ModsmithError#

Bases: Exception

Base class for every error raised by this package.

exception NetworkError(
message: str,
status: int | None = None,
)#

Bases: ModsmithError

An HTTP request failed.

Parameters:
  • message (str) – What went wrong.

  • status (int | None) – The HTTP status code.

status#

The HTTP status code, or None if no response arrived.

exception PackError#

Bases: ModsmithError

A modpack archive is invalid.

exception PlatformError#

Bases: ModsmithError

A platform could not provide the requested data.

exception ProcessorError#

Bases: LoaderError

A Forge or NeoForge install processor failed.

exception UnresolvedEntriesError(
entries: Sequence[PackEntry],
)#

Bases: InstanceError

A pack still has entries with no download.

Parameters:

entries (Sequence[PackEntry]) – The entries that could not be found.

entries#

The entries that could not be found.

exception UnsupportedError#

Bases: ModsmithError

The requested version, loader or format is not supported.