TypeError: %d format: a number is required, not NoneType

Bug #1788558 reported by Mischa ter Smitten
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Since the latest version we have the following error when making backups:

--- Start running command BKP at 00:00:02.617 ---
Reading globbing filelist /etc/duply/var-www/exclude
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Thu Aug 16 00:00:02 2018
Traceback (innermost last):
  File "/usr/bin/duplicity", line 1567, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1553, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1405, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1535, in do_backup
    incremental_backup(sig_chain)
  File "/usr/bin/duplicity", line 680, in incremental_backup
    globals.backend)
  File "/usr/bin/duplicity", line 466, in write_multivol
    (tdp, dest_filename, vol_num)))
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 146, in schedule_task
    return self.__run_synchronously(fn, params)
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 172, in __run_synchronously
    ret = fn(*params)
  File "/usr/bin/duplicity", line 465, in <lambda>
    vol_num: put(tdp, dest_filename, vol_num),
  File "/usr/bin/duplicity", line 355, in put
    validate_block(putsize, dest_filename)
  File "/usr/bin/duplicity", line 337, in validate_block
    util.escape(dest_filename), orig_size))
 TypeError: %d format: a number is required, not NoneType

Some information about (one of) our machine(s):

Using installed duplicity version 0.7.18, python 2.7.12, gpg 1.4.20 (Home: ~/.gnupg), awk 'GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)', grep 'grep (GNU grep) 2.25', bash '4.3.48(1)-release (x86_64-pc-linux-gnu)'

If you need more information, feel free to ask.

Revision history for this message
Clemens Fuchslocher (clemens-fuchslocher) wrote :

I get the same error and stacktrace with duplicity 0.7.18 and the following command:

| $ duplicity --version
| duplicity 0.7.18
|
| $ duplicity incremental --name "##########" --full-if-older-than 15D --gpg-options="--cipher-algo=AES" --num-retries 10 --backend-retry-delay 10 --verbosity notice "/srv/##########" "par2+sftp://##########/"
| Local and Remote metadata are synchronized, no sync needed.
| Last full backup date: ########################
| Traceback (innermost last):
| File "/usr/bin/duplicity", line 1567, in <module>
| with_tempdir(main)
| File "/usr/bin/duplicity", line 1553, in with_tempdir
| fn()
| File "/usr/bin/duplicity", line 1405, in main
| do_backup(action)
| File "/usr/bin/duplicity", line 1535, in do_backup
| incremental_backup(sig_chain)
| File "/usr/bin/duplicity", line 680, in incremental_backup
| globals.backend)
| File "/usr/bin/duplicity", line 466, in write_multivol
| (tdp, dest_filename, vol_num)))
| File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 146, in schedule_task
| return self.__run_synchronously(fn, params)
| File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 172, in __run_synchronously
| ret = fn(*params)
| File "/usr/bin/duplicity", line 465, in <lambda>
| vol_num: put(tdp, dest_filename, vol_num),
| File "/usr/bin/duplicity", line 355, in put
| validate_block(putsize, dest_filename)
| File "/usr/bin/duplicity", line 337, in validate_block
| util.escape(dest_filename), orig_size))
| TypeError: %d format: a number is required, not NoneType

With --asynchronous-upload the stacktrace is different:

| $ duplicity --version
| duplicity 0.7.18
|
| $ duplicity incremental --name "##########" --full-if-older-than 15D --gpg-options="--cipher-algo=AES" --num-retries 10 --backend-retry-delay 10 --verbosity notice "/srv/##########" "par2+sftp://##########/" --asynchronous-upload
| Local and Remote metadata are synchronized, no sync needed.
| Last full backup date: ########################
| Traceback (innermost last):
| File "/usr/bin/duplicity", line 1567, in <module>
| with_tempdir(main)
| File "/usr/bin/duplicity", line 1553, in with_tempdir
| fn()
| File "/usr/bin/duplicity", line 1405, in main
| do_backup(action)
| File "/usr/bin/duplicity", line 1535, in do_backup
| incremental_backup(sig_chain)
| File "/usr/bin/duplicity", line 680, in incremental_backup
| globals.backend)
| File "/usr/bin/duplicity", line 481, in write_multivol
| bytes_written += waiter()
| File "/usr/lib/python2.7/dist-packages/duplicity/dup_threading.py", line 201, in waiter
| raise state['error'].with_traceback(state['trace'])
| AttributeError: 'exceptions.TypeError' object has no attribute 'with_traceback'

The same commands work fine with duplicity 0.7.17.

Tested with a recent Ubuntu 16.04.

Revision history for this message
Mischa ter Smitten (mischa-ter-smitten) wrote :

New in v0.7.18 (2018/08/21)
---------------------------
* Fixed bug #1756550 Online html man page is showing a 0 byte file
* Partial fix of bug #1734144 with patch from Joris van Eijden
  - Note: this is really just a partial fix for now, since it only covers
    the case where the local size does not yet match the remote size. A
    case where -1 is the returned length is not fixed.
  - Number of retries is now same as globals.num_retries.
  - Added standoff delay of 0.5 sec per attempt.
* Fixed bug #1764432 with patch from Robke Geenen
  - Just join the parts together.
* Fixed bug #1717935 with suggestion from strainu
  - Use urllib.quote_plus() to properly quote pathnames passed via URL
* Fixed bug #1780617 Test fail when GnuPG >= 2.2.8
  - Relevant change in GnuPG 2.2.8: https://dev.gnupg.org/T3981
  - Added '--ignore-mdc-error' to all gpg calls made.
* Fixed bug #1785520 with patch from Chris Hunt
  - Fix for B2 version 1.3.4 just released
* Fix a 2to3 error in ssh_paramiko_backend.py

Changed in duplicity:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Kenneth Loafman (kenneth-loafman)
milestone: none → 0.7.19
Revision history for this message
Mike Laurense (mikelaurense) wrote :

Can confirm the same error as Clemens when using --asynchronous-upload on Ubuntu 18.04. Full command:

/usr/bin/duplicity --asynchronous-upload --allow-source-mismatch --full-if-older-than 4W --volsize 250 --no-encryption --include-filelist backuplist.txt / pexpect+scp://<user>@<host>/data > data.log

Revision history for this message
Carsten Schmitz (cschmitz) wrote :

Same problem here...

Stacktrace

LFTP version is 4.4.13
Local and Remote metadata are synchronized, no sync needed.
Last full backup left a partial set, restarting.
Last full backup date: Fri Aug 24 01:00:02 2018
RESTART: The first volume failed to upload before termination.
         Restart is impossible...starting backup from beginning.
LFTP version is 4.4.13
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Thu Aug 23 01:00:01 2018
Traceback (innermost last):
  File "/usr/bin/duplicity", line 1567, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1553, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1405, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1523, in do_backup
    full_backup(col_stats)
  File "/usr/bin/duplicity", line 584, in full_backup
    globals.backend)
  File "/usr/bin/duplicity", line 466, in write_multivol
    (tdp, dest_filename, vol_num)))
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 146, in schedule_task
    return self.__run_synchronously(fn, params)
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 172, in __run_synchronously
    ret = fn(*params)
  File "/usr/bin/duplicity", line 465, in <lambda>
    vol_num: put(tdp, dest_filename, vol_num),
  File "/usr/bin/duplicity", line 355, in put
    validate_block(putsize, dest_filename)
  File "/usr/bin/duplicity", line 337, in validate_block
    util.escape(dest_filename), orig_size))
 TypeError: %d format: a number is required, not NoneType

LFTP version is 4.4.13
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Aug 24 13:50:00 2018
No old backup sets found, nothing deleted.

Command is:

/usr/bin/duplicity full --archive-dir=/root/.duplicity --volsize 1000 --name etc_daily --encrypt-key <somekey> --gpg-options "--homedir=/blah/.gnupg" /etc/ ftp://someuser@$someserver/full

Revision history for this message
Maxxer (lorenzo-milesi) wrote :

Today I upgraded from 0.7.17 to 0.7.18 and I ran into the same problem, using S3 as backend

Revision history for this message
Gwyn Ciesla (limburgher) wrote :

Seeing this also on Fedora Rawhide since 0.7.18

Revision history for this message
Matthias Homann (palto) wrote :

Same issue on Ubuntu Budgie 18.04 32-bit
Downgraded to duplicity 0.7.17 as a workaround.

Revision history for this message
Carsten Schmitz (cschmitz) wrote :

Is there ETA on the fix? Downgrade to 0.7.17 seems not to be trivial on Ubuntu 14.04 - I found a .deb package of the pervious release but trying to install it seems to hit alot of unsolved dependencies

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

This is fixed in the trunk and will be in the daily PPAs soon.

Changed in duplicity:
status: In Progress → Fix Committed
assignee: Kenneth Loafman (kenneth-loafman) → nobody
assignee: nobody → Kenneth Loafman (kenneth-loafman)
Changed in duplicity:
assignee: Kenneth Loafman (kenneth-loafman) → nobody
Revision history for this message
Maxxer (lorenzo-milesi) wrote :

Any chance to have a patch release in the stable ppa, as 0.7.16-ubuntu16 has gone? thanks

Changed in duplicity:
milestone: 0.7.19 → 0.8.00
milestone: 0.8.00 → none
milestone: none → 0.8.00
milestone: 0.8.00 → 0.7.18.1
Changed in duplicity:
status: Fix Committed → Fix Released
Changed in duplicity:
milestone: 0.7.18.1 → 0.7.18.2
status: Fix Released → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.