exceptions#
Conda exceptions.
Functions#
|
|
|
|
|
Yield non-container errors, flattening nested ``CondaMultiError``s. |
|
Combine core guidance with plugin hints for a leaf |
|
Format each leaf error for human output with its own guidance. |
|
Build JSON error map with print-time guidance (leaf errors only). |
|
|
|
Attributes#
- UnsatisfiableConflictEntry#
- exception ResolvePackageNotFound(bad_deps: collections.abc.Iterable[collections.abc.Iterable[conda.models.match_spec.MatchSpec]])#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- bad_deps#
- _formatted_chains#
- exception LockError(message: str)#
Bases:
conda.CondaError,OSErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception ArgumentError(message: str, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- return_code = 2#
- exception Help(message: str | None, *args: Any, caused_by: Any = None, guidance: _private.exception_guidance.ErrorGuidance | _private.exception_guidance.ErrorGuidanceTypedDict | None = None, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- return_code = 0#
- exception ActivateHelp#
Bases:
HelpCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception DeactivateHelp#
Bases:
HelpCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception GenericHelp(command: str)#
Bases:
HelpCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaSignalInterrupt(signum: int)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception TooManyArgumentsError(expected: int, received: int, offending_arguments: collections.abc.Iterable[str], optional_message: str = '', *args)#
Bases:
ArgumentErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- expected#
- received#
- offending_arguments#
- optional_message = ''#
- exception ClobberError(message: str, path_conflict: conda.base.constants.PathConflict, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- path_conflict#
- __repr__()#
Return repr(self).
- exception BasicClobberError(source_path: conda.common.path.PathType, target_path: conda.common.path.PathType, context: conda.base.context.Context)#
Bases:
ClobberErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception KnownPackageClobberError(target_path: conda.common.path.PathType, colliding_dist_being_linked: conda.models.records.PackageRecord | str, colliding_linked_dist: conda.models.records.PackageRecord | str, context: conda.base.context.Context)#
Bases:
ClobberErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception UnknownPackageClobberError(target_path: conda.common.path.PathType, colliding_dist_being_linked: conda.models.records.PackageRecord | str, context: conda.base.context.Context)#
Bases:
ClobberErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
Bases:
ClobberErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CommandNotFoundError(command: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception PathNotFoundError(path: conda.common.path.PathType)#
Bases:
conda.CondaError,OSErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception DirectoryNotFoundError(path: conda.common.path.PathType)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentLocationNotFound(location: conda.common.path.PathType)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentNameNotFound(environment_name: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception NoBaseEnvironmentError#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception DirectoryNotACondaEnvironmentError(target_directory: conda.common.path.PathType)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaEnvironmentError(message: str, *args)#
Bases:
conda.CondaError,OSErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception DryRunExit#
Bases:
conda.CondaExitZeroCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaSystemExit(*args)#
Bases:
conda.CondaExitZero,SystemExitCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception PaddingError(dist: str, placeholder: str, placeholder_length: int)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception LinkError(message: str, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception LinkSourceNotFoundError(src: str, **kwargs)#
Bases:
conda.CondaErrorRaised when the source of a link does not exist.
Carries the missing
srcpath so callers can remediate without parsing the error message. UnlikePathNotFoundError, the source is expected to be an already-extracted package file, so a missing source usually points at a corrupt package cache entry to clean up.Raised by
create_link(), which is not package-cache specific, so theconda clean --packagesadvice in the message does not fit every caller.Initialize self. See help(type(self)) for accurate signature.
- src#
- exception LinkScriptError(message: str, action: str, prec: conda.models.records.PackageRecord, path: str, **kwargs)#
Bases:
LinkErrorRaised when a pre-link or post-link script exits non-zero.
Carries structured information about the failure (the script's
action, theprecit ran for and thepathof the script) so callers can dispatch on the type and fields instead of parsing the message.Failing unlink scripts only log a warning and report failure by returning
False, soactionis always"pre-link"or"post-link".Initialize self. See help(type(self)) for accurate signature.
- action#
- prec#
- path#
- exception CondaOSError(message: str, **kwargs)#
Bases:
conda.CondaError,OSErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception ProxyError(message: str | None = None)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaIOError(message: str, *args)#
Bases:
conda.CondaError,OSErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaFileIOError(filepath: conda.common.path.PathType, message: str, *args)#
Bases:
CondaIOErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- filepath#
- exception CondaKeyError(key: Any, message: str, *args)#
Bases:
conda.CondaError,KeyErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- key#
- msg#
- exception ChannelError(message: str | None, *args: Any, caused_by: Any = None, guidance: _private.exception_guidance.ErrorGuidance | _private.exception_guidance.ErrorGuidanceTypedDict | None = None, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception ChannelNotAllowed(channel: conda.models.channel.Channel)#
Bases:
ChannelErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- warning = 'Channel not included in allowlist'#
- exception ChannelDenied(channel: conda.models.channel.Channel)#
Bases:
ChannelNotAllowedCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- warning = 'Channel included in denylist'#
Bases:
ChannelErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception OperationNotAllowed(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaImportError(message: str)#
Bases:
conda.CondaError,ImportErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception ParseError(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CouldntParseError(reason: str)#
Bases:
ParseErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- reason#
- exception ChecksumMismatchError(url: str, target_full_path: conda.common.path.PathType, checksum_type: str, expected_checksum: str, actual_checksum: str, partial_download: bool = False)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaHTTPError(message: str, url: str, status_code: int | str, reason: str, elapsed_time: datetime.timedelta | str, response: requests.Response | None = None, caused_by: Any = None)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaSSLError(message: str | None, *args: Any, caused_by: Any = None, guidance: _private.exception_guidance.ErrorGuidance | _private.exception_guidance.ErrorGuidanceTypedDict | None = None, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception AuthenticationError(message: str | None, *args: Any, caused_by: Any = None, guidance: _private.exception_guidance.ErrorGuidance | _private.exception_guidance.ErrorGuidanceTypedDict | None = None, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception PackagesNotFoundError(packages: collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str], channel_urls: collections.abc.Iterable[str] = ())#
Bases:
conda.CondaErrorBase error for missing packages.
Prefer raising one of the more specific subclasses:
PackagesNotFoundInChannelsError– packages unavailable in channels.PackageNotInstalledError– packages missing from a target prefix.
Initialize self. See help(type(self)) for accurate signature.
- packages#
- channel_urls = ()#
- exception PackagesNotFoundInChannelsError(packages: collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str], channel_urls: collections.abc.Iterable[str])#
Bases:
PackagesNotFoundErrorThe requested packages are not available from the configured channels.
Initialize self. See help(type(self)) for accurate signature.
- exception PackageNotInstalledError(prefix: conda.common.path.PathType, package_name: str | collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str])#
Bases:
PackagesNotFoundErrorThe requested package(s) are missing from the target environment/prefix.
Initialize self. See help(type(self)) for accurate signature.
- exception PackagesNotFoundInPrefixError(packages: collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str], prefix: conda.common.path.PathType)#
Bases:
PackageNotInstalledErrorThe requested package(s) are missing from the target environment/prefix.
This is a backwards-compatible alias for
PackageNotInstalledError.Initialize self. See help(type(self)) for accurate signature.
- exception NoChannelsConfiguredError(packages: collections.abc.Iterable[str] = ())#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception UnsatisfiableError(bad_deps: UnsatisfiableConflictMap, chains: bool = True, strict: bool = False)#
Bases:
conda.CondaErrorRaised when dependency constraints cannot be satisfied.
- Parameters:
bad_deps -- Classified resolver conflicts, or empty when hints are off.
chains -- Unused; retained for call-site compatibility.
strict -- Whether strict channel priority was in effect.
Initialize self. See help(type(self)) for accurate signature.
- unsatisfiable = []#
- _get_guidance(bad_deps: UnsatisfiableConflictMap, strict: bool = False) conda._private.exception_guidance.ErrorGuidanceTypedDict | None#
Build guidance dict for
UnsatisfiableError, orNone.
- exception RemoveError(message: str, *, guidance: conda._private.exception_guidance.ErrorGuidance | conda._private.exception_guidance.ErrorGuidanceTypedDict | None = None)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception DisallowedPackageError(package_ref: conda.models.records.PackageRecord, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception SpecsConfigurationConflictError(requested_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec], pinned_specs: collections.abc.Iterable[conda.models.match_spec.MatchSpec], prefix: conda.common.path.PathType)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaIndexError(message: str)#
Bases:
conda.CondaError,IndexErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaValueError(message: str, *args, **kwargs)#
Bases:
conda.CondaError,ValueErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception PlatformMismatchError(incompatible: collections.abc.Iterable[tuple[str, collections.abc.Iterable[str]]], subdir: str)#
Bases:
CondaValueErrorRaised when one or more environment specs do not cover the requested platform.
The message is derived from a list of
(source, available_platforms)pairs so the wording stays consistent whether the failure comes from a single file (conda create,conda update) or several (Environment.from_cliwith multiple-f/--filearguments).Initialize self. See help(type(self)) for accurate signature.
- exception CyclicalDependencyError(packages_with_cycles: collections.abc.Iterable[conda.models.records.PackageRecord], **kwargs)#
Bases:
conda.CondaError,ValueErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CorruptedEnvironmentError(environment_location: conda.common.path.PathType, corrupted_file: conda.common.path.PathType, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaHistoryError(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaUpgradeError(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaVerificationError(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception SafetyError(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaMemoryError(caused_by: Any, **kwargs)#
Bases:
conda.CondaError,MemoryErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception NotWritableError(path: conda.common.path.PathType, errno: int, **kwargs)#
Bases:
conda.CondaError,OSErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- errno#
- exception NoWritableEnvsDirError(envs_dirs: collections.abc.Iterable[conda.common.path.PathType], **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception NoWritablePkgsDirError(pkgs_dirs: collections.abc.Iterable[conda.common.path.PathType], **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentIsFrozenError(prefix: conda.common.path.PathType, message: str = '', **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentNotWritableError(environment_location: conda.common.path.PathType, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaDependencyError(message: str)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception BinaryPrefixReplacementError(path: conda.common.path.PathType, placeholder: str, new_prefix: conda.common.path.PathType, original_data_length: int, new_data_length: int)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception InvalidSpec(message: str, **kwargs)#
Bases:
conda.CondaError,ValueErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception InvalidVersionSpec(invalid_spec: str | conda.models.match_spec.MatchSpec, details: str)#
Bases:
InvalidSpecCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception InvalidMatchSpec(invalid_spec: str | conda.models.match_spec.MatchSpec, details: str)#
Bases:
InvalidSpecCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EncodingError(caused_by: Any, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception NoSpaceLeftError(caused_by: Any, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaEnvException(message: str, *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentFileInvalid(msg: str, *args, **kwargs)#
Bases:
CondaEnvExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentFileNotFound(filename: conda.common.path.PathType, *args, **kwargs)#
Bases:
CondaEnvExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- filename#
- exception EnvironmentFileExtensionNotValid(filename: conda.common.path.PathType, *args, **kwargs)#
Bases:
CondaEnvExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- filename#
- exception EnvironmentFileTypeMismatchError(file_types: dict[str, str], *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentFileEmpty(filename: conda.common.path.PathType, *args, **kwargs)#
Bases:
CondaEnvExceptionCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- filename#
- exception EnvironmentFileNotDownloaded(username: str, packagename: str, *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- username#
- packagename#
- exception PluginError(message: str | None, *args: Any, caused_by: Any = None, guidance: _private.exception_guidance.ErrorGuidance | _private.exception_guidance.ErrorGuidanceTypedDict | None = None, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception SpecNotFound(msg: str, *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- format_env_spec_available_plugins(plugin_specs: list[conda.plugins.types.CondaEnvironmentSpecifier], formats_header: str = 'Available formats', indent: int = 4, cmd_suggestion: bool = True)#
- exception AmbiguousEnvironmentSpecPlugin(msg: str, plugins: list[conda.plugins.types.CondaEnvironmentSpecifier], *args, **kwargs)#
Bases:
PluginErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentSpecPluginSelectionError(msg: str, plugin_specs: list[conda.plugins.types.CondaEnvironmentSpecifier], *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentSpecPluginNotDetected(plugin_specs: list[conda.plugins.types.CondaEnvironmentSpecifier], *args, **kwargs)#
Bases:
SpecNotFoundCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception EnvironmentExporterNotDetected(filename: str, exporters: collections.abc.Iterable[conda.plugins.types.CondaEnvironmentExporter], *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- filename#
- exception SpecNotFoundInPackageCache(msg: str, *args, **kwargs)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- maybe_raise(error: BaseException, context: conda.base.context.Context)#
- _get_errors(exc_val: BaseException) collections.abc.Iterable[BaseException]#
Yield non-container errors, flattening nested ``CondaMultiError``s.
- _get_guidance(error: conda.CondaError) conda._private.exception_guidance.ErrorGuidance | None#
Combine core guidance with plugin hints for a leaf
CondaError.
- _format_leaf_errors(leaves: collections.abc.Iterable[BaseException]) str#
Format each leaf error for human output with its own guidance.
- _json_error_map(error: BaseException) dict[str, Any]#
Build JSON error map with print-time guidance (leaf errors only).
- print_conda_exception(exc_val: conda.CondaError, exc_tb: types.TracebackType | None = None)#
- _format_exc(exc_val: BaseException | None = None, exc_tb: types.TracebackType | None = None)#
- exception InvalidInstaller(name: str, *, file: str | None = None)#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception OfflineError(message: str | None, *args: Any, caused_by: Any = None, guidance: _private.exception_guidance.ErrorGuidance | _private.exception_guidance.ErrorGuidanceTypedDict | None = None, **kwargs)#
Bases:
conda.CondaError,RuntimeErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- exception CondaUpdatePackageError(spec: str | list[str])#
Bases:
conda.CondaErrorCommon base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.