:py:mod:`exceptions` ==================== .. py:module:: conda.exceptions .. autoapi-nested-parse:: Conda exceptions. Functions --------- .. autoapisummary:: conda.exceptions.maybe_raise conda.exceptions.print_conda_exception conda.exceptions._format_exc .. py:exception:: ResolvePackageNotFound(bad_deps: collections.abc.Iterable[collections.abc.Iterable[conda.models.match_spec.MatchSpec]]) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: bad_deps .. py:attribute:: _formatted_chains .. py:exception:: LockError(message: str) Bases: :py:obj:`conda.CondaError`, :py:obj:`OSError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ArgumentError(message: str, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: return_code :value: 2 .. py:exception:: Help(message: str | None, caused_by: Optional[Any] = None, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ActivateHelp Bases: :py:obj:`Help` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: DeactivateHelp Bases: :py:obj:`Help` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: GenericHelp(command: str) Bases: :py:obj:`Help` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaSignalInterrupt(signum: int) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: TooManyArgumentsError(expected: int, received: int, offending_arguments: collections.abc.Iterable[str], optional_message: str = '', *args) Bases: :py:obj:`ArgumentError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: expected .. py:attribute:: received .. py:attribute:: offending_arguments .. py:attribute:: optional_message :value: '' .. py:exception:: ClobberError(message: str, path_conflict: conda.base.constants.PathConflict, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: path_conflict .. py:method:: __repr__() Return repr(self). .. py:exception:: BasicClobberError(source_path: conda.common.path.PathType, target_path: conda.common.path.PathType, context: conda.base.context.Context) Bases: :py:obj:`ClobberError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py: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: :py:obj:`ClobberError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: UnknownPackageClobberError(target_path: conda.common.path.PathType, colliding_dist_being_linked: conda.models.records.PackageRecord | str, context: conda.base.context.Context) Bases: :py:obj:`ClobberError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: SharedLinkPathClobberError(target_path: conda.common.path.PathType, incompatible_package_dists: collections.abc.Iterable[conda.models.records.PackageRecord | str], context: conda.base.context.Context) Bases: :py:obj:`ClobberError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CommandNotFoundError(command: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: PathNotFoundError(path: conda.common.path.PathType) Bases: :py:obj:`conda.CondaError`, :py:obj:`OSError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: DirectoryNotFoundError(path: conda.common.path.PathType) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentLocationNotFound(location: conda.common.path.PathType) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentNameNotFound(environment_name: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: NoBaseEnvironmentError Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: DirectoryNotACondaEnvironmentError(target_directory: conda.common.path.PathType) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaEnvironmentError(message: str, *args) Bases: :py:obj:`conda.CondaError`, :py:obj:`OSError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: DryRunExit Bases: :py:obj:`conda.CondaExitZero` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaSystemExit(*args) Bases: :py:obj:`conda.CondaExitZero`, :py:obj:`SystemExit` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: PaddingError(dist: str, placeholder: str, placeholder_length: int) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: LinkError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaOSError(message: str, **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`OSError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ProxyError(message: str | None = None) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaIOError(message: str, *args) Bases: :py:obj:`conda.CondaError`, :py:obj:`OSError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaFileIOError(filepath: conda.common.path.PathType, message: str, *args) Bases: :py:obj:`CondaIOError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: filepath .. py:exception:: CondaKeyError(key: Any, message: str, *args) Bases: :py:obj:`conda.CondaError`, :py:obj:`KeyError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: key .. py:attribute:: msg :value: 'Uninferable: Uninferable' .. py:exception:: ChannelError(message: str | None, caused_by: Optional[Any] = None, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ChannelNotAllowed(channel: conda.models.channel.Channel) Bases: :py:obj:`ChannelError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: warning :value: 'Channel not included in allowlist' .. py:exception:: ChannelDenied(channel: conda.models.channel.Channel) Bases: :py:obj:`ChannelNotAllowed` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: warning :value: 'Channel included in denylist' .. py:exception:: UnavailableInvalidChannel(channel: conda.models.channel.Channel | str, status_code: str | int, response: requests.models.Response | None = None) Bases: :py:obj:`ChannelError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: status_code :type: str | int .. py:exception:: OperationNotAllowed(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaImportError(message: str) Bases: :py:obj:`conda.CondaError`, :py:obj:`ImportError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: ParseError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CouldntParseError(reason: str) Bases: :py:obj:`ParseError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: reason .. py: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: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py: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: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaSSLError(message: str | None, caused_by: Optional[Any] = None, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: AuthenticationError(message: str | None, caused_by: Optional[Any] = None, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: PackagesNotFoundError(packages: collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str], channel_urls: collections.abc.Iterable[str] = ()) Bases: :py:obj:`conda.CondaError` Base error for missing packages. Prefer raising one of the more specific subclasses: - :class:`PackagesNotFoundInChannelsError` – packages unavailable in channels. - :class:`PackageNotInstalledError` – packages missing from a target prefix. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: packages .. py:attribute:: channel_urls :value: () .. py:exception:: PackagesNotFoundInChannelsError(packages: collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str], channel_urls: collections.abc.Iterable[str]) Bases: :py:obj:`PackagesNotFoundError` The requested packages are not available from the configured channels. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: PackageNotInstalledError(prefix: conda.common.path.PathType, package_name: str | collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str]) Bases: :py:obj:`PackagesNotFoundError` The requested package(s) are missing from the target environment/prefix. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: PackagesNotFoundInPrefixError(packages: collections.abc.Iterable[conda.models.match_spec.MatchSpec | conda.models.records.PackageRecord | str], prefix: conda.common.path.PathType) Bases: :py:obj:`PackageNotInstalledError` The requested package(s) are missing from the target environment/prefix. This is a backwards-compatible alias for :class:`PackageNotInstalledError`. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: NoChannelsConfiguredError(packages: collections.abc.Iterable[str] = ()) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: UnsatisfiableError(bad_deps: collections.abc.Iterable[collections.abc.Iterable[conda.models.match_spec.MatchSpec]], chains: bool = True, strict: bool = False) Bases: :py:obj:`conda.CondaError` An exception to report unsatisfiable dependencies. :param bad_deps: a list of tuples of objects (likely MatchSpecs). :param chains: (optional) if True, the tuples are interpreted as chains of dependencies, from top level to bottom. If False, the tuples are interpreted as simple lists of conflicting specs. :returns: Raises an exception with a formatted message detailing the unsatisfiable specifications. Initialize self. See help(type(self)) for accurate signature. .. py:method:: _format_chain_str(bad_deps: collections.abc.Iterable[collections.abc.Iterable[conda.models.match_spec.MatchSpec]]) .. py:attribute:: unsatisfiable :value: [] .. py:exception:: RemoveError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: DisallowedPackageError(package_ref: conda.models.records.PackageRecord, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py: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: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaIndexError(message: str) Bases: :py:obj:`conda.CondaError`, :py:obj:`IndexError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaValueError(message: str, *args, **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`ValueError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CyclicalDependencyError(packages_with_cycles: collections.abc.Iterable[conda.models.records.PackageRecord], **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`ValueError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CorruptedEnvironmentError(environment_location: conda.common.path.PathType, corrupted_file: conda.common.path.PathType, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaHistoryError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaUpgradeError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaVerificationError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: SafetyError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaMemoryError(caused_by: Any, **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`MemoryError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: NotWritableError(path: conda.common.path.PathType, errno: int, **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`OSError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: errno POSIX exception code .. py:exception:: NoWritableEnvsDirError(envs_dirs: collections.abc.Iterable[conda.common.path.PathType], **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: NoWritablePkgsDirError(pkgs_dirs: collections.abc.Iterable[conda.common.path.PathType], **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentIsFrozenError(prefix: conda.common.path.PathType, message: str = '', **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentNotWritableError(environment_location: conda.common.path.PathType, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaDependencyError(message: str) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: BinaryPrefixReplacementError(path: conda.common.path.PathType, placeholder: str, new_prefix: conda.common.path.PathType, original_data_length: int, new_data_length: int) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: InvalidSpec(message: str, **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`ValueError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: InvalidVersionSpec(invalid_spec: str | conda.models.match_spec.MatchSpec, details: str) Bases: :py:obj:`InvalidSpec` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: InvalidMatchSpec(invalid_spec: str | conda.models.match_spec.MatchSpec, details: str) Bases: :py:obj:`InvalidSpec` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EncodingError(caused_by: Any, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: NoSpaceLeftError(caused_by: Any, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaEnvException(message: str, *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentFileInvalid(msg: str, *args, **kwargs) Bases: :py:obj:`CondaEnvException` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentFileNotFound(filename: conda.common.path.PathType, *args, **kwargs) Bases: :py:obj:`CondaEnvException` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: filename .. py:exception:: EnvironmentFileExtensionNotValid(filename: conda.common.path.PathType, *args, **kwargs) Bases: :py:obj:`CondaEnvException` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: filename .. py:exception:: EnvironmentFileTypeMismatchError(file_types: dict[str, str], *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentFileEmpty(filename: conda.common.path.PathType, *args, **kwargs) Bases: :py:obj:`CondaEnvException` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: filename .. py:exception:: EnvironmentFileNotDownloaded(username: str, packagename: str, *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: username .. py:attribute:: packagename .. py:exception:: PluginError(message: str | None, caused_by: Optional[Any] = None, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: SpecNotFound(msg: str, *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentSpecPluginSelectionError(msg: str, plugin_specs: dict[str, conda.plugins.types.CondaEnvironmentSpecifier], *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: EnvironmentSpecPluginNotDetected(name: str, plugin_names: collections.abc.Iterable[str], autodetect_disabled_plugins: collections.abc.Iterable[str] = (), *args, **kwargs) Bases: :py:obj:`SpecNotFound` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: name .. py:exception:: EnvironmentExporterNotDetected(filename: str, exporters: collections.abc.Iterable[conda.plugins.types.CondaEnvironmentExporter], *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: filename .. py:exception:: SpecNotFoundInPackageCache(msg: str, *args, **kwargs) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:function:: maybe_raise(error: BaseException, context: conda.base.context.Context) .. py:function:: print_conda_exception(exc_val: conda.CondaError, exc_tb: types.TracebackType | None = None) .. py:function:: _format_exc(exc_val: BaseException | None = None, exc_tb: types.TracebackType | None = None) .. py:exception:: InvalidInstaller(name: str) Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: OfflineError(message: str | None, caused_by: Optional[Any] = None, **kwargs) Bases: :py:obj:`conda.CondaError`, :py:obj:`RuntimeError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: CondaUpdatePackageError(spec: str | list[str]) Bases: :py:obj:`conda.CondaError` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature.