: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:exception:: LockError(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:: 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: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:method:: __repr__() Return repr(self). .. py:exception:: BasicClobberError(source_path: os.PathLike, target_path: os.PathLike, 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: os.PathLike, 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: os.PathLike, 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: os.PathLike, 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: os.PathLike) 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: os.PathLike) 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: os.PathLike) 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: os.PathLike) 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 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: os.PathLike, 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: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: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:exception:: ChecksumMismatchError(url: str, target_full_path: os.PathLike, 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:: PackageNotInstalledError(prefix: os.PathLike, package_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:: 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` 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: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: os.PathLike) 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: os.PathLike, corrupted_file: os.PathLike, **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: os.PathLike, 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:exception:: NoWritableEnvsDirError(envs_dirs: collections.abc.Iterable[os.PathLike], **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[os.PathLike], **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: os.PathLike, 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: os.PathLike, **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: os.PathLike, placeholder: str, new_prefix: os.PathLike, 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:: EnvironmentFileNotFound(filename: os.PathLike, *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:: EnvironmentFileExtensionNotValid(filename: os.PathLike, *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:: EnvironmentFileEmpty(filename: os.PathLike, *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:: 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:exception:: EnvironmentSpecPluginNotDetected(name, plugin_names, *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:: 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:: 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: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.