MissingExtraError#
- class openstef_core.exceptions.MissingExtraError(extra: str, package: str = 'openstef-beam', *, install_extra: str | None = None)[source]#
Bases:
ExceptionException raised when an optional dependency for a feature is not installed.
- __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"), yieldingpip install {package}[{install_extra}]. WhenNonethe hint installsextradirectly. Prefer naming the extra group: not every package defines an[all]extra, and some groups are mutually exclusive.extra
package
install_extra