AttributeError: 'module' object has not attribute 'packages'

Asked by Andy Hairston

I'm running duplicity 0.7.19 on Centos 7, backing up to a Backblaze B2 account. I periodically get an error:

Attempt [x] failed. AttributeError: 'module' object has no attribute 'packages'

When I do, the progress information becomes nonsense. Here's an excerpt from my logs:

Jan 23 01:00:05 fafnir backups: Local and Remote metadata are synchronized, no sync needed.
 Jan 23 01:00:05 fafnir backups: Last full backup date: none
 Jan 23 01:00:05 fafnir backups: No signatures found, switching to full backup.
 Jan 23 03:00:10 fafnir backups: 1.0GB 02:00:00 [43.2KB/s] [> ] 0% ETA 8d 6h 33min
 Jan 23 05:00:11 fafnir backups: 2.0GB 04:00:00 [73.7KB/s] [> ] 2% ETA 8d 3h 58min
 Jan 23 07:00:11 fafnir backups: 3.0GB 06:00:00 [94.6KB/s] [=> ] 2% ETA 8d 2h 26min
 Jan 23 09:00:11 fafnir backups: 4.0GB 08:00:00 [109.6KB/s] [=> ] 3% ETA 8d 16min
 Jan 23 11:00:11 fafnir backups: 4.9GB 10:00:00 [119.0KB/s] [=> ] 4% ETA 7d 23h 7min
 Jan 23 13:00:11 fafnir backups: 5.9GB 12:00:00 [126.1KB/s] [==> ] 5% ETA 7d 21h 21min
 Jan 23 15:00:11 fafnir backups: 6.9GB 14:00:00 [131.1KB/s] [==> ] 6% ETA 7d 19h 28min
 Jan 23 17:00:11 fafnir backups: 7.9GB 16:00:00 [134.7KB/s] [===> ] 7% ETA 7d 17h 30min
 Jan 23 17:14:59 fafnir backups: Attempt 1 failed. AttributeError: 'module' object has no attribute 'packages'
 Jan 23 17:30:43 fafnir backups: Attempt 2 failed. AttributeError: 'module' object has no attribute 'packages'
 Jan 23 17:46:23 fafnir backups: Attempt 3 failed. AttributeError: 'module' object has no attribute 'packages'
 Jan 23 19:00:11 fafnir backups: 285.6GB 18:00:00 [11.9MB/s] [=======================================> ] 99% ETA 10min
 Jan 23 20:48:50 fafnir backups: Attempt 1 failed. AttributeError: 'module' object has no attribute 'packages'
 Jan 23 21:00:11 fafnir backups: 286.6GB 20:00:00 [8.4MB/s] [=======================================> ] 99% ETA 12min
 Jan 23 23:00:11 fafnir backups: 287.6GB 22:00:00 [5.9MB/s] [=======================================> ] 99% ETA 13min

Any ideas on what is happening and how to prevent it?

Question information

Language:
English Edit question
Status:
Answered
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kenneth Loafman (kenneth-loafman) said :
#1

What command line?

Please run with -v9 and attach the log to this question.

Revision history for this message
Andy Hairston (whairst) said :
#2

I have this command line in a script:
PASSPHRASE="[passphrase redacted]" duplicity --progress --progress-rate 7200 /home/[folder redacted] b2://[key redacted]@[bucket and folder redacted]

It's called from cron like this:
[script name] | logger -t backups

I (re)ran with -v9. I'm guessing you don't want or need the full 10,000+ lines, but probably this excerpt:

Jan 29 14:18:14 fafnir backups: Getting delta of (duplicati-bb8434f1fa55a4cacac317a30d3c9d1ca.dblock.zip.aes reg) and None
Jan 29 14:18:14 fafnir backups: A duplicati-bb8434f1fa55a4cacac317a30d3c9d1ca.dblock.zip.aes
Jan 29 14:18:22 fafnir backups: AsyncScheduler: running task synchronously (asynchronicity disabled)
Jan 29 14:18:22 fafnir backups: Writing duplicity-full.20200123T060005Z.vol362.difftar.gpg
Jan 29 14:18:22 fafnir backups: Put: /tmp/duplicity-B8z5vS-tempdir/mktemp-HfU6lV-7 -> [folder redacted]/duplicity-full.20200123T060005Z.vol362.difftar.gpg
Jan 29 14:18:25 fafnir backups: Backtrace of previous error: Traceback (innermost last):
Jan 29 14:18:25 fafnir backups: File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 369, in inner_retry
Jan 29 14:18:25 fafnir backups: return fn(self, *args)
Jan 29 14:18:25 fafnir backups: File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 529, in put
Jan 29 14:18:25 fafnir backups: self.__do_put(source_path, remote_filename)
Jan 29 14:18:25 fafnir backups: File "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 515, in __do_put
Jan 29 14:18:25 fafnir backups: self.backend._put(source_path, remote_filename)
Jan 29 14:18:25 fafnir backups: File "/usr/lib64/python2.7/site-packages/duplicity/backends/b2backend.py", line 121, in _put
Jan 29 14:18:25 fafnir backups: progress_listener=progress_listener_factory())
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/logfury/v0_1/trace_call.py", line 84, in wrapper
Jan 29 14:18:25 fafnir backups: return function(*wrapee_args, **wrapee_kwargs)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 537, in upload_local_file
Jan 29 14:18:25 fafnir backups: progress_listener=progress_listener
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/logfury/v0_1/trace_call.py", line 84, in wrapper
Jan 29 14:18:25 fafnir backups: return function(*wrapee_args, **wrapee_kwargs)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 593, in upload
Jan 29 14:18:25 fafnir backups: upload_source, file_name, content_type, file_info, progress_listener
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 677, in _upload_large_file
Jan 29 14:18:25 fafnir backups: part_sha1_array = [interruptible_get_result(f)['contentSha1'] for f in part_futures]
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/utils.py", line 41, in interruptible_get_result
Jan 29 14:18:25 fafnir backups: return future.result(timeout=1.0)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 429, in result
Jan 29 14:18:25 fafnir backups: return self.__get_result()
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/concurrent/futures/thread.py", line 62, in run
Jan 29 14:18:25 fafnir backups: result = self.fn(*self.args, **self.kwargs)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 765, in _upload_part
Jan 29 14:18:25 fafnir backups: HEX_DIGITS_AT_END, hashing_stream
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/raw_api.py", line 545, in upload_part
Jan 29 14:18:25 fafnir backups: return self.b2_http.post_content_return_json(upload_url, headers, data_stream)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/b2http.py", line 297, in post_content_return_json
Jan 29 14:18:25 fafnir backups: response = _translate_and_retry(do_post, try_count, post_params)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/b2http.py", line 119, in _translate_and_retry
Jan 29 14:18:25 fafnir backups: return _translate_errors(fcn, post_params)
Jan 29 14:18:25 fafnir backups: File "/usr/lib/python2.7/site-packages/b2sdk/b2http.py", line 69, in _translate_errors
Jan 29 14:18:25 fafnir backups: if isinstance(e1, requests.packages.urllib3.exceptions.MaxRetryError):
Jan 29 14:18:25 fafnir backups: AttributeError: 'module' object has no attribute 'packages'
Jan 29 14:18:55 fafnir backups: Writing duplicity-full.20200123T060005Z.vol362.difftar.gpg
Jan 29 14:18:55 fafnir backups: Put: /tmp/duplicity-B8z5vS-tempdir/mktemp-HfU6lV-7 -> [folder redacted]/duplicity-full.20200123T060005Z.vol362.difftar.gpg

Revision history for this message
Kenneth Loafman (kenneth-loafman) said :
#3

Turns out the problem is coming from the b2sdk package, but not causing any
real problems.

If you want, you can report the bug to the b2sdk folks and maybe they can
fix it. You can do that here:
https://github.com/Backblaze/b2-sdk-python/issues

...Ken

On Wed, Jan 29, 2020 at 1:43 PM Andy Hairston <
<email address hidden>> wrote:

> Question #688226 on Duplicity changed:
> https://answers.launchpad.net/duplicity/+question/688226
>
> Status: Needs information => Open
>
> Andy Hairston gave more information on the question:
> I have this command line in a script:
> PASSPHRASE="[passphrase redacted]" duplicity --progress --progress-rate
> 7200 /home/[folder redacted] b2://[key redacted]@[bucket and folder
> redacted]
>
> It's called from cron like this:
> [script name] | logger -t backups
>
> I (re)ran with -v9. I'm guessing you don't want or need the full 10,000+
> lines, but probably this excerpt:
>
> Jan 29 14:18:14 fafnir backups: Getting delta of
> (duplicati-bb8434f1fa55a4cacac317a30d3c9d1ca.dblock.zip.aes reg) and None
>
>
> Jan 29 14:18:14 fafnir backups: A
> duplicati-bb8434f1fa55a4cacac317a30d3c9d1ca.dblock.zip.aes
>
>
> Jan 29 14:18:22 fafnir backups: AsyncScheduler: running task synchronously
> (asynchronicity disabled)
>
> Jan 29 14:18:22 fafnir backups: Writing
> duplicity-full.20200123T060005Z.vol362.difftar.gpg
>
>
> Jan 29 14:18:22 fafnir backups: Put:
> /tmp/duplicity-B8z5vS-tempdir/mktemp-HfU6lV-7 -> [folder
> redacted]/duplicity-full.20200123T060005Z.vol362.difftar.gpg
>
> Jan 29 14:18:25 fafnir backups: Backtrace of previous error: Traceback
> (innermost last):
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 369, in
> inner_retry
>
> Jan 29 14:18:25 fafnir backups: return fn(self, *args)
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 529, in
> put
>
> Jan 29 14:18:25 fafnir backups: self.__do_put(source_path,
> remote_filename)
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib64/python2.7/site-packages/duplicity/backend.py", line 515, in
> __do_put
>
> Jan 29 14:18:25 fafnir backups: self.backend._put(source_path,
> remote_filename)
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib64/python2.7/site-packages/duplicity/backends/b2backend.py", line
> 121, in _put
>
> Jan 29 14:18:25 fafnir backups:
> progress_listener=progress_listener_factory())
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/logfury/v0_1/trace_call.py", line 84, in
> wrapper
>
> Jan 29 14:18:25 fafnir backups: return function(*wrapee_args,
> **wrapee_kwargs)
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 537, in
> upload_local_file
>
> Jan 29 14:18:25 fafnir backups: progress_listener=progress_listener
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/logfury/v0_1/trace_call.py", line 84, in
> wrapper
>
> Jan 29 14:18:25 fafnir backups: return function(*wrapee_args,
> **wrapee_kwargs)
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 593, in upload
>
>
> Jan 29 14:18:25 fafnir backups: upload_source, file_name, content_type,
> file_info, progress_listener
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 677, in
> _upload_large_file
>
> Jan 29 14:18:25 fafnir backups: part_sha1_array =
> [interruptible_get_result(f)['contentSha1'] for f in part_futures]
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/utils.py", line 41, in
> interruptible_get_result
>
> Jan 29 14:18:25 fafnir backups: return future.result(timeout=1.0)
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 429,
> in result
>
> Jan 29 14:18:25 fafnir backups: return self.__get_result()
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/concurrent/futures/thread.py", line 62,
> in run
>
> Jan 29 14:18:25 fafnir backups: result = self.fn(*self.args,
> **self.kwargs)
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/bucket.py", line 765, in
> _upload_part
>
> Jan 29 14:18:25 fafnir backups: HEX_DIGITS_AT_END, hashing_stream
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/raw_api.py", line 545, in
> upload_part
>
> Jan 29 14:18:25 fafnir backups: return
> self.b2_http.post_content_return_json(upload_url, headers, data_stream)
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/b2http.py", line 297, in
> post_content_return_json
>
> Jan 29 14:18:25 fafnir backups: response =
> _translate_and_retry(do_post, try_count, post_params)
>
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/b2http.py", line 119, in
> _translate_and_retry
>
> Jan 29 14:18:25 fafnir backups: return _translate_errors(fcn,
> post_params)
>
> Jan 29 14:18:25 fafnir backups: File
> "/usr/lib/python2.7/site-packages/b2sdk/b2http.py", line 69, in
> _translate_errors
>
> Jan 29 14:18:25 fafnir backups: if isinstance(e1,
> requests.packages.urllib3.exceptions.MaxRetryError):
>
> Jan 29 14:18:25 fafnir backups: AttributeError: 'module' object has no
> attribute 'packages'
>
> Jan 29 14:18:55 fafnir backups: Writing
> duplicity-full.20200123T060005Z.vol362.difftar.gpg
>
>
> Jan 29 14:18:55 fafnir backups: Put:
> /tmp/duplicity-B8z5vS-tempdir/mktemp-HfU6lV-7 -> [folder
> redacted]/duplicity-full.20200123T060005Z.vol362.difftar.gpg
>
> --
> You received this question notification because your team duplicity-team
> is an answer contact for Duplicity.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~duplicity-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~duplicity-team
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask Andy Hairston for more information if necessary.

To post a message you must log in.