b2sdk.exception
– Exceptions¶
-
exception
b2sdk.exception.
B2ConnectionError
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.TransientErrorMixin
,b2sdk.exception.B2SimpleError
-
exception
b2sdk.exception.
B2Error
(*args, **kwargs)[source]¶ Bases:
Exception
-
__init__
(*args, **kwargs)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
property
prefix
¶ nice auto-generated error message prefix >>> B2SimpleError().prefix ‘Simple error’ >>> AlreadyFailed().prefix ‘Already failed’
-
-
exception
b2sdk.exception.
B2RequestTimeout
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.TransientErrorMixin
,b2sdk.exception.B2SimpleError
-
exception
b2sdk.exception.
B2SimpleError
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
a B2Error with a message prefix
-
exception
b2sdk.exception.
BadDateFormat
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
-
prefix
= 'Date from server'¶
-
-
exception
b2sdk.exception.
BadJson
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
-
prefix
= 'Bad request'¶
-
-
exception
b2sdk.exception.
BadUploadUrl
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.TransientErrorMixin
,b2sdk.exception.B2SimpleError
-
exception
b2sdk.exception.
BrokenPipe
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
ChecksumMismatch
(checksum_type, expected, actual)[source]¶ Bases:
b2sdk.exception.TransientErrorMixin
,b2sdk.exception.B2Error
-
exception
b2sdk.exception.
ClockSkew
(clock_skew_seconds)[source]¶ Bases:
b2sdk.exception.B2HttpCallbackPostRequestException
The clock on the server differs from the local clock by too much.
-
exception
b2sdk.exception.
CommandError
(message)[source]¶ Bases:
b2sdk.exception.B2Error
b2 command error (user caused). Accepts exactly one argument. We expect users of shell scripts will parse our __str__ output.
-
__init__
(message)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
ConnectionReset
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
DestFileNewer
(dest_file, source_file, dest_prefix, source_prefix)[source]¶ Bases:
b2sdk.exception.B2Error
-
__init__
(dest_file, source_file, dest_prefix, source_prefix)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
DuplicateBucketName
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
-
prefix
= 'Bucket name is already in use'¶
-
-
exception
b2sdk.exception.
InvalidAuthToken
(message, code)[source]¶ Bases:
b2sdk.exception.Unauthorized
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.
-
__init__
(message, code)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
InvalidMetadataDirective
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
InvalidRange
(content_length, range_)[source]¶ Bases:
b2sdk.exception.B2Error
-
__init__
(content_length, range_)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
MaxFileSizeExceeded
(size, max_allowed_size)[source]¶ Bases:
b2sdk.exception.B2Error
-
__init__
(size, max_allowed_size)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
MaxRetriesExceeded
(limit, exception_info_list)[source]¶ Bases:
b2sdk.exception.B2Error
-
__init__
(limit, exception_info_list)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
MissingPart
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
-
prefix
= 'Part number has not been uploaded'¶
-
-
exception
b2sdk.exception.
NonExistentBucket
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
-
prefix
= 'No such bucket'¶
-
-
exception
b2sdk.exception.
NotAllowedByAppKeyError
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
Base class for errors caused by restrictions on an application key.
-
exception
b2sdk.exception.
PartSha1Mismatch
(key)[source]¶ Bases:
b2sdk.exception.B2Error
-
__init__
(key)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
RestrictedBucket
(bucket_name)[source]¶ Bases:
b2sdk.exception.B2Error
-
__init__
(bucket_name)[source]¶ Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
-
-
exception
b2sdk.exception.
ServiceError
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.TransientErrorMixin
,b2sdk.exception.B2Error
Used for HTTP status codes 500 through 599.
-
exception
b2sdk.exception.
StorageCapExceeded
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
TooManyRequests
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
TruncatedOutput
(bytes_read, file_size)[source]¶ Bases:
b2sdk.exception.TransientErrorMixin
,b2sdk.exception.B2Error
Bases:
b2sdk.exception.B2Error
Python 2 does not like it when you pass unicode as the message in an exception. We like to use file names in exception messages. To avoid problems, if the message has any non-ascii characters in it, they are replaced with backslash-uNNNN
https://pythonhosted.org/kitchen/unicode-frustrations.html#frustration-5-exceptions
Returns 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.exception.
UnknownHost
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
UnrecognizedBucketType
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
UnsatisfiableRange
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2Error
-
exception
b2sdk.exception.
UnusableFileName
(*args, **kwargs)[source]¶ Bases:
b2sdk.exception.B2SimpleError
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.