craft_parts.errors module¶
Craft parts errors.
- exception craft_parts.errors.CallbackRegistrationError(message)[source]¶
Bases:
PartsErrorError in callback function registration.
- Parameters:
message (
str) – the error message.
- exception craft_parts.errors.CopyFileNotFound(name)[source]¶
Bases:
PartsErrorAn attempt was made to copy a file that doesn’t exist.
- Parameters:
name (
str) – The file name.
- exception craft_parts.errors.CopyTreeError(message)[source]¶
Bases:
PartsErrorFailed to copy or link a file tree.
- Parameters:
message (
str) – The error message.
- exception craft_parts.errors.DebError(deb_path, command, exit_code)[source]¶
Bases:
PartsErrorA “deb”-related command failed.
- Parameters:
deb_path (
Path)command (
list[str])exit_code (
int)
- exception craft_parts.errors.FeatureError(message, details=None)[source]¶
Bases:
PartsErrorA feature is not configured as expected.
- Parameters:
message (
str)details (
str|None)
- exception craft_parts.errors.FileOrganizeError(*, part_name, message)[source]¶
Bases:
PartsErrorFailed to organize a file layout.
- Parameters:
part_name (
str) – The name of the part being processed.message (
str) – The error message.
- exception craft_parts.errors.FilesetConflict(conflicting_files)[source]¶
Bases:
PartsErrorInconsistent stage to prime filtering.
- Parameters:
conflicting_files (
set[str]) – A set containing the conflicting file names.
- exception craft_parts.errors.FilesetError(*, name, message)[source]¶
Bases:
PartsErrorAn invalid fileset operation was performed.
- Parameters:
name (
str) – The name of the fileset.message (
str) – The error message.
- exception craft_parts.errors.FilesystemMountError(brief, *, details=None, resolution=None)[source]¶
Bases:
PartsErrorErrors related to filesystem mounts.
- Parameters:
brief (
str)details (
str|None)resolution (
str|None)
- exception craft_parts.errors.InvalidAction(message)[source]¶
Bases:
PartsErrorAn attempt was made to execute an action with invalid parameters.
- Parameters:
message (
str) – The error message.
- exception craft_parts.errors.InvalidApplicationName(name)[source]¶
Bases:
PartsErrorThe application name contains invalid characters.
- Parameters:
name (
str) – The invalid application name.
- exception craft_parts.errors.InvalidArchitecture(arch_name)[source]¶
Bases:
PartsErrorThe machine architecture is not supported.
- Parameters:
arch_name (
str) – The unsupported architecture name.
- exception craft_parts.errors.InvalidControlAPICall(*, part_name, scriptlet_name, message)[source]¶
Bases:
PartsErrorA control API call was made with invalid parameters.
- Parameters:
part_name (
str) – The name of the part being processed.scriptlet_name (
str) – The name of the scriptlet that originated the call.message (
str) – The error message.
- exception craft_parts.errors.InvalidPartName(part_name)[source]¶
Bases:
PartsErrorAn operation was requested on a part that’s not in the parts specification.
- Parameters:
part_name (
str) – The invalid part name.
- exception craft_parts.errors.InvalidPlugin(plugin_name, *, part_name)[source]¶
Bases:
PartsErrorA request was made to use a plugin that’s not registered.
- Parameters:
plugin_name (
str) – The invalid plugin name.”part_name (
str) – The name of the part defining the invalid plugin.
- exception craft_parts.errors.OsReleaseCodenameError[source]¶
Bases:
PartsErrorFailed to determine the host operating system version codename.
- exception craft_parts.errors.OsReleaseIdError[source]¶
Bases:
PartsErrorFailed to determine the host operating system identification string.
- exception craft_parts.errors.OsReleaseNameError[source]¶
Bases:
PartsErrorFailed to determine the host operating system name.
- exception craft_parts.errors.OsReleaseVersionIdError[source]¶
Bases:
PartsErrorFailed to determine the host operating system version.
- exception craft_parts.errors.OverlayPackageNotFound(*, part_name, package_name)[source]¶
Bases:
PartsErrorFailed to install an overlay package.
- Parameters:
part_name (
str) – The name of the part being processed.message – the error message.
package_name (
str)
- exception craft_parts.errors.OverlayPermissionError[source]¶
Bases:
PartsErrorA project using overlays was processed by a non-privileged user.
- exception craft_parts.errors.OverlayPlatformError[source]¶
Bases:
PartsErrorA project using overlays was processed on a non-Linux platform.
- exception craft_parts.errors.OverlayStageConflict(*, part_name, overlay_part_name, conflicting_files, partition=None)[source]¶
Bases:
PartsErrorA conflict between contents to be staged from the overlay and from the build step.
- Parameters:
part_name (
str)overlay_part_name (
str)conflicting_files (
list[str])partition (
str|None)
- exception craft_parts.errors.PartDependencyCycle[source]¶
Bases:
PartsErrorA dependency cycle has been detected in the parts definition.
- exception craft_parts.errors.PartFilesConflict(*, part_name, other_part_name, conflicting_files, partition=None)[source]¶
Bases:
PartsErrorDifferent parts list the same files with different contents.
- Parameters:
part_name (
str) – The name of the part being processed.other_part_name (
str) – The name of the conflicting part.conflicting_files (
list[str]) – The list of conflicting files.partition (
str|None) – Optional name of the partition where the conflict occurred.
- exception craft_parts.errors.PartSpecificationError(*, part_name, message)[source]¶
Bases:
PartsErrorA part was not correctly specified.
- Parameters:
part_name (
str) – The name of the part being processed.message (
str) – The error message.
- classmethod from_validation_error(*, part_name, error_list)[source]¶
Create a PartSpecificationError from a pydantic error list.
- Parameters:
part_name (
str) – The name of the part being processed.error_list (
list[ErrorDetails]) – A list of dictionaries containing pydantic error definitions.
- Return type:
- exception craft_parts.errors.PartitionError(brief, *, details=None, resolution=None)[source]¶
Bases:
PartsErrorErrors related to partitions.
- Parameters:
brief (
str)details (
str|None)resolution (
str|None)
- exception craft_parts.errors.PartitionNotFound(partition_name, partitions)[source]¶
Bases:
PartitionUsageErrorA partition has been specified that does not exist.
- Parameters:
partition_name (
str) – The name of the partition that does not exist.partitions (
Iterable[str]) – Iterable of the names of valid partitions.
- exception craft_parts.errors.PartitionUsageError(error_list, partitions, brief=None)[source]¶
Bases:
PartitionErrorError for a list of invalid partition usages.
- Parameters:
error_list (
Iterable[str]) – Iterable of strings describing the invalid usages.partitions (
Iterable[str] |None) – Iterable of the names of valid partitions.brief (
str|None) – Override brief message.
- exception craft_parts.errors.PartitionUsageWarning(warning_list)[source]¶
Bases:
PartitionError,WarningWarnings for possibly invalid usages of partitions.
- Parameters:
warning_list (
Iterable[str]) – Iterable of strings describing the misuses.
- exception craft_parts.errors.PartsError(brief, details=None, resolution=None, doc_slug=None)[source]¶
Bases:
ExceptionUnexpected error.
- Parameters:
brief (
str) – Brief description of error.details (
str|None) – Detailed information.resolution (
str|None) – Recommendation, if any.doc_slug (
str|None) – Reusable documentation slug for consumers adopting the Craft Parts documentation.
- property details: str | None¶
Further details on the error.
- exception craft_parts.errors.PluginBuildError(*, part_name, plugin_name, stderr=None)[source]¶
Bases:
UserExecutionErrorPlugin build script failed at runtime.
- Parameters:
part_name (
str) – The name of the part being processed.plugin_name (
str) – The name of the plugin being processed.stderr (
bytes|None) – The contents of the build execution error.
- exception craft_parts.errors.PluginCleanError(*, part_name)[source]¶
Bases:
PartsErrorScript to clean strict build preparation failed at runtime.
- Parameters:
part_name (
str) – The name of the part being processed.
- exception craft_parts.errors.PluginEnvironmentValidationError(*, part_name, reason)[source]¶
Bases:
PartsErrorPlugin environment validation failed at runtime.
- Parameters:
part_name (
str) – The name of the part being processed.reason (
str)
- exception craft_parts.errors.PluginNotStrict(plugin_name, *, part_name)[source]¶
Bases:
PartsErrorA request was made to use a plugin that’s not strict.
- Parameters:
plugin_name (
str) – The plugin name.part_name (
str) – The name of the part defining the plugin.
- exception craft_parts.errors.PluginPullError(*, part_name)[source]¶
Bases:
PartsErrorPlugin pull script failed at runtime.
- Parameters:
part_name (
str) – The name of the part being processed.
- exception craft_parts.errors.ScriptletRunError(*, part_name, scriptlet_name, exit_code, stderr=None)[source]¶
Bases:
UserExecutionErrorA scriptlet execution failed.
- Parameters:
part_name (
str) – The name of the part being processed.scriptlet_name (
str) – The name of the scriptlet that failed to execute.exit_code (
int) – The execution error code.stderr (
bytes|None) – The contents of the scriptlet execution error.
- exception craft_parts.errors.StageFilesConflict(*, part_name, conflicting_files)[source]¶
Bases:
PartsErrorFiles from a part conflict with files already being staged.
- Parameters:
part_name (
str) – The name of the part being processed.conflicting_files (
list[str]) – The list of confictling files.
- exception craft_parts.errors.StagePackageNotFound(*, part_name, package_name)[source]¶
Bases:
PartsErrorFailed to install a stage package.
- Parameters:
part_name (
str) – The name of the part being processed.package_name (
str) – The name of the package.
- exception craft_parts.errors.UndefinedPlugin(*, part_name)[source]¶
Bases:
PartsErrorThe part didn’t define a plugin and the part name is not a valid plugin name.
- Parameters:
part_name (
str) – The name of the part with no plugin definition.
- exception craft_parts.errors.UnsupportedBuildAttributesError(unsupported, plugin_name)[source]¶
Bases:
PartsErrorUse of build-attributes that a plugin does not support.
- Parameters:
unsupported (
set[str])plugin_name (
str)
- exception craft_parts.errors.UserExecutionError(*, brief, resolution, stderr=None)[source]¶
Bases:
PartsError,ABCPlugin build script failed at runtime.
- Parameters:
part_name – The name of the part being processed.
plugin_name – The name of the plugin being processed.
brief (
str)resolution (
str)stderr (
bytes|None)
- property details: str | None¶
Further details on the error.
Displays the last three trace lines from the error output.
- exception craft_parts.errors.XAttributeError(key, path, *, is_write=False)[source]¶
Bases:
PartsErrorFailed to read or write an extended attribute.
- Parameters:
action – The action being performed.
key (
str) – The extended attribute key.path (
str) – The file path.is_write (
bool) – Whether this is an attribute write operation.
- exception craft_parts.errors.XAttributeTooLong(key, value, path)[source]¶
Bases:
PartsErrorFailed to write an extended attribute because key and/or value is too long.
- Parameters:
key (
str) – The extended attribute key.value (
str) – The extended attribute value.path (
str) – The file path.