Exceptions¶
-
exception
b2sdk.v1.exception.
AccountInfoError
(*args, **kwargs)[source]¶ Base class for all account info errors.
-
exception
b2sdk.v1.exception.
CorruptAccountInfo
(file_name)[source]¶ Raised when an account info file is corrupted.
-
exception
b2sdk.v1.exception.
MissingAccountData
(key)[source]¶ Raised when there is no account info data available.
-
exception
b2sdk.v1.exception.
B2Error
(*args, **kwargs)[source]¶ -
property
prefix
¶ Nice, auto-generated error message prefix.
>>> B2SimpleError().prefix 'Simple error' >>> AlreadyFailed().prefix 'Already failed'
-
property
-
exception
b2sdk.v1.exception.
B2SimpleError
(*args, **kwargs)[source]¶ A B2Error with a message prefix.
-
exception
b2sdk.v1.exception.
ClockSkew
(clock_skew_seconds)[source]¶ The clock on the server differs from the local clock by too much.
-
exception
b2sdk.v1.exception.
CommandError
(message)[source]¶ b2 command error (user caused). Accepts exactly one argument: message.
We expect users of shell scripts will parse our
__str__
output.
-
exception
b2sdk.v1.exception.
DestFileNewer
(dest_file, source_file, dest_prefix, source_prefix)[source]¶
-
exception
b2sdk.v1.exception.
DuplicateBucketName
(*args, **kwargs)[source]¶ -
prefix
= 'Bucket name is already in use'¶
-
-
exception
b2sdk.v1.exception.
InvalidAuthToken
(message, code)[source]¶ Specific type of Unauthorized that means the auth token is invalid. This is not the case where the auth token is valid, but does not allow access.
-
exception
b2sdk.v1.exception.
MissingPart
(*args, **kwargs)[source]¶ -
prefix
= 'Part number has not been uploaded'¶
-
-
exception
b2sdk.v1.exception.
NotAllowedByAppKeyError
(*args, **kwargs)[source]¶ Base class for errors caused by restrictions on an application key.
-
exception
b2sdk.v1.exception.
ServiceError
(*args, **kwargs)[source]¶ Used for HTTP status codes 500 through 599.
Return true if this is an error that should tell the upload code to get a new upload URL and try the upload again.
-
exception
b2sdk.v1.exception.
UnusableFileName
(*args, **kwargs)[source]¶ Raise when a filename doesn’t meet the rules.
Could possibly use InvalidUploadSource, but this is intended for the filename on the server, which could differ. https://www.backblaze.com/b2/docs/files.html.
-
b2sdk.v1.exception.
interpret_b2_error
(status, code, message, response_headers, post_params=None)[source]¶