errors.py
Custom exceptions used by Copier.
ConfigFileError
¶
Bases: ValueError, CopierError
Parent class defining problems with the config file.
Source code in copier/errors.py
44 45 | |
CopierAnswersInterrupt
¶
Bases: CopierError, KeyboardInterrupt
CopierAnswersInterrupt is raised during interactive question prompts.
It typically follows a KeyboardInterrupt (i.e. ctrl-c) and provides an opportunity for the caller to conduct additional cleanup, such as writing the partially completed answers to a file.
Attributes:
| Name | Type | Description |
|---|---|---|
answers |
AnswersMap that contains the partially completed answers object. |
|
last_question |
Question representing the last_question that was asked at the time the interrupt was raised. |
|
template |
Template that was being processed for answers. |
Source code in copier/errors.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
CopierError
¶
Bases: Exception
Base class for all other Copier errors.
Source code in copier/errors.py
26 27 | |
CopierWarning
¶
Bases: Warning
Base class for all other Copier warnings.
Source code in copier/errors.py
170 171 | |
DirtyLocalWarning
¶
Bases: UserWarning, CopierWarning
Changes and untracked files present in template.
Source code in copier/errors.py
182 183 | |
ExtensionNotFoundError
¶
Bases: UserMessageError
Extensions listed in the configuration could not be loaded.
Source code in copier/errors.py
88 89 | |
InteractiveSessionError
¶
Bases: UserMessageError
An interactive session is required to run this program.
Source code in copier/errors.py
198 199 200 201 202 | |
InvalidConfigFileError
¶
Bases: ConfigFileError
Indicates that the config file is wrong.
Source code in copier/errors.py
48 49 50 51 52 53 54 | |
InvalidTypeError
¶
Bases: TypeError, CopierError
The question type is not among the supported ones.
Source code in copier/errors.py
66 67 | |
MissingFileWarning
¶
Bases: UserWarning, CopierWarning
I still couldn't find what I'm looking for.
Source code in copier/errors.py
194 195 | |
MissingSettingsWarning
¶
Bases: UserWarning, CopierWarning
Settings path has been defined but file is missing.
Source code in copier/errors.py
190 191 | |
MultipleConfigFilesError
¶
Bases: ConfigFileError
Both copier.yml and copier.yaml found, and that's an error.
Source code in copier/errors.py
57 58 59 60 61 62 63 | |
MultipleYieldTagsError
¶
Bases: CopierError
Multiple yield tags are used in one path name, but it is not allowed.
Source code in copier/errors.py
136 137 | |
OldTemplateWarning
¶
Bases: UserWarning, CopierWarning
Template was designed for an older Copier version.
Source code in copier/errors.py
178 179 | |
PathError
¶
Bases: CopierError, ValueError
The path is invalid in the given context.
Source code in copier/errors.py
70 71 | |
PathNotAbsoluteError
¶
Bases: PathError
The path is not absolute, but it should be.
Source code in copier/errors.py
74 75 76 77 78 | |
PathNotRelativeError
¶
Bases: PathError
The path is not relative, but it should be.
Source code in copier/errors.py
81 82 83 84 85 | |
ShallowCloneWarning
¶
Bases: UserWarning, CopierWarning
The template repository is a shallow clone.
Source code in copier/errors.py
186 187 | |
TaskError
¶
Bases: CalledProcessError, UserMessageError
Exception raised when a task fails.
Source code in copier/errors.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
from_process(process)
classmethod
¶
Create a TaskError from a CompletedProcess.
Source code in copier/errors.py
156 157 158 159 160 161 162 163 164 165 166 | |
UnknownCopierVersionWarning
¶
Bases: UserWarning, CopierWarning
Cannot determine installed Copier version.
Source code in copier/errors.py
174 175 | |
UnsafeTemplateError
¶
Bases: CopierError
Unsafe Copier template features are used without explicit consent.
Source code in copier/errors.py
120 121 122 123 124 125 126 127 128 129 | |
UnsupportedVersionError
¶
Bases: UserMessageError
Copier version does not support template version.
Source code in copier/errors.py
40 41 | |
UserMessageError
¶
Bases: CopierError
Exit the program giving a message to the user.
Source code in copier/errors.py
30 31 32 33 34 35 36 37 | |
YieldTagInFileError
¶
Bases: CopierError
A yield tag is used in the file content, but it is not allowed.
Source code in copier/errors.py
132 133 | |