prefect.exceptions
¶
Prefect-specific exceptions.
Abort
¶
Bases: PrefectSignal
Raised when the API sends an 'ABORT' instruction during state proposal.
Indicates that the run should exit immediately.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
276 277 278 279 280 281 |
|
BlockMissingCapabilities
¶
Bases: PrefectException
Raised when a block does not have required capabilities for a given operation.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
348 349 350 351 |
|
CancelledRun
¶
Bases: PrefectException
Raised when the result from a cancelled run is retrieved and an exception is not attached.
This occurs when a string is attached to the state instead of an exception or if the state's data is null.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
78 79 80 81 82 83 84 85 |
|
CrashedRun
¶
Bases: PrefectException
Raised when the result from a crashed run is retrieved.
This occurs when a string is attached to the state instead of an exception or if the state's data is null.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
59 60 61 62 63 64 65 |
|
ExternalSignal
¶
Bases: BaseException
Base type for external signal-like exceptions that should never be caught by users.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
290 291 292 293 |
|
FailedRun
¶
Bases: PrefectException
Raised when the result from a failed run is retrieved and an exception is not attached.
This occurs when a string is attached to the state instead of an exception or if the state's data is null.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
68 69 70 71 72 73 74 75 |
|
FlowPauseTimeout
¶
Bases: PrefectException
Raised when a flow pause times out
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
388 389 |
|
FlowScriptError
¶
Bases: PrefectException
Raised when a script errors during evaluation while attempting to load a flow.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
InfrastructureError
¶
Bases: PrefectException
A base class for exceptions related to infrastructure blocks
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
364 365 366 367 |
|
InfrastructureNotAvailable
¶
Bases: PrefectException
Raised when infrastructure is not accessable from the current machine. For example, if a process was spawned on another machine it cannot be managed.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
377 378 379 380 381 |
|
InfrastructureNotFound
¶
Bases: PrefectException
Raised when infrastructure is missing, likely because it has exited or been deleted.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
370 371 372 373 374 |
|
InvalidNameError
¶
Bases: PrefectException
, ValueError
Raised when a name contains characters that are not permitted.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
264 265 266 267 |
|
InvalidRepositoryURLError
¶
Bases: PrefectException
Raised when an incorrect URL is provided to a GitHub filesystem block.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
360 361 |
|
MappingLengthMismatch
¶
Bases: PrefectException
Raised when attempting to call Task.map with arguments of different lengths.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
336 337 338 339 |
|
MappingMissingIterable
¶
Bases: PrefectException
Raised when attempting to call Task.map with all static arguments
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
342 343 344 345 |
|
MissingContextError
¶
Bases: PrefectException
, RuntimeError
Raised when a method is called that requires a task or flow run context to be active but one cannot be found.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
244 245 246 247 248 |
|
MissingFlowError
¶
Bases: PrefectException
Raised when a given flow name is not found in the expected script.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
102 103 104 105 |
|
MissingProfileError
¶
Bases: PrefectException
, ValueError
Raised when a profile name does not exist.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
251 252 253 254 |
|
MissingResult
¶
Bases: PrefectException
Raised when a result is missing from a state; often when result persistence is disabled and the state is retrieved from the API.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
114 115 116 117 118 |
|
NotPausedError
¶
Bases: PrefectException
Raised when attempting to unpause a run that isn't paused.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
384 385 |
|
ObjectAlreadyExists
¶
Bases: PrefectException
Raised when the client receives a 409 (conflict) from the API.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
227 228 229 230 231 232 233 234 |
|
ObjectNotFound
¶
Bases: PrefectException
Raised when the client receives a 404 (not found) from the API.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
217 218 219 220 221 222 223 224 |
|
ParameterBindError
¶
Bases: TypeError
, PrefectException
Raised when args and kwargs cannot be converted to parameters.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
ParameterTypeError
¶
Bases: PrefectException
Raised when a parameter does not pass Pydantic type validation.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
166 167 168 169 170 171 172 173 174 175 176 177 178 |
|
Pause
¶
Bases: PrefectSignal
Raised when a flow run is PAUSED and needs to exit for resubmission.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
284 285 286 287 |
|
PausedRun
¶
Bases: PrefectException
Raised when the result from a paused run is retrieved.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
88 89 90 91 |
|
PrefectException
¶
Bases: Exception
Base exception type for Prefect errors.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
53 54 55 56 |
|
PrefectHTTPStatusError
¶
Bases: HTTPStatusError
Raised when client receives a Response
that contains an HTTPStatusError.
Used to include API error details in the error messages that the client provides users.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
|
from_httpx_error
classmethod
¶
Generate a PrefectHTTPStatusError
from an httpx.HTTPStatusError
.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
|
PrefectSignal
¶
Bases: BaseException
Base type for signal-like exceptions that should never be caught by users.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
270 271 272 273 |
|
ProtectedBlockError
¶
Bases: PrefectException
Raised when an operation is prevented due to block protection.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
354 355 356 357 |
|
ReservedArgumentError
¶
Bases: PrefectException
, TypeError
Raised when a function used with Prefect has an argument with a name that is reserved for a Prefect feature
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
257 258 259 260 261 |
|
ScriptError
¶
Bases: PrefectException
Raised when a script errors during evaluation while attempting to load data
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
SignatureMismatchError
¶
Bases: PrefectException
, TypeError
Raised when parameters passed to a function do not match its signature.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
TerminationSignal
¶
Bases: ExternalSignal
Raised when a flow run receives a termination signal.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
296 297 298 299 300 301 302 |
|
UnfinishedRun
¶
Bases: PrefectException
Raised when the result from a run that is not finished is retrieved.
For example, if a run is in a SCHEDULED, PENDING, CANCELLING, or RUNNING state.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
94 95 96 97 98 99 |
|
UnspecifiedFlowError
¶
Bases: PrefectException
Raised when multiple flows are found in the expected script and no name is given.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
108 109 110 111 |
|
UpstreamTaskError
¶
Bases: PrefectException
Raised when a task relies on the result of another task but that task is not 'COMPLETE'
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
237 238 239 240 241 |
|
exception_traceback
¶
Convert an exception to a printable string with a traceback
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/exceptions.py
45 46 47 48 49 50 |
|