MissingExtraError#

class openstef_core.exceptions.MissingExtraError(extra: str, package: str = 'openstef-beam', *, install_extra: str | None = None)[source]#

Bases: Exception

Exception raised when an optional dependency for a feature is not installed.

Parameters:
__init__(extra: str, package: str = 'openstef-beam', *, install_extra: str | None = None)[source]#

Initialize the exception with the missing dependency and how to install it.

Parameters:
  • extra (str) – Import/distribution name that failed to import (e.g. "onnxruntime").

  • package (str) – OpenSTEF package that owns the optional feature.

  • install_extra (str | None) – The extra group to install for this feature (e.g. "cpu"), yielding pip install {package}[{install_extra}]. When None the hint installs extra directly. Prefer naming the extra group: not every package defines an [all] extra, and some groups are mutually exclusive.

  • extra

  • package

  • install_extra