Package: duplicity
Version: 0.8.04-2
Severity: normal

Dear Maintainer,

I am attempting to use the new python3 version of duplicity for Backblaze.
Note: I have installed the python3 b2 library (pip3 install b2).

Any use fails with:

Attempt 1 failed. TypeError: can only concatenate str (not "bytes") to str

Using duplicity -v9, we can see that the error is in b2backend (not in the b2 
library):
  File "/usr/lib/python3/dist-packages/duplicity/backends/b2backend.py", line 
121, in _put
    log.Log(u"Put: %s -> %s" % (source_path.name, self.path + remote_filename), 
log.INFO)
 TypeError: can only concatenate str (not "bytes") to str

Adding some debugging code I can see that the type of self.path is <class 'str'>
and the type of remote_filename is <class 'bytes'>.

Here is the full -v9 output (with my account number replaced with X's):

> duplicity -v9 full /tmp/b b2://XXXXXXXXXXX@test-b2backend-grc
Using archive dir: /home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613
Using backup name: 5fdb77f0e23a2029470bb8bbe5d05613
GPG binary is gpg, version (2, 2, 17)
Import of duplicity.backends.adbackend Succeeded
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.jottacloudbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pcabackend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Password for 'XXXXXXXXXXX@B2': 
B2 Backend (path= , bucket= test-b2backend-grc, minimum_part_size= 100000000)
Bucket found
Main action: full
Acquiring lockfile 
b'/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/lockfile'
================================================================================
duplicity $version ($reldate)
Args: /usr/bin/duplicity -v9 full /tmp/b b2://XXXXXXXXXXX@test-b2backend-grc
Linux novatech 5.2.0-3-amd64 #1 SMP Debian 5.2.17-1 (2019-09-26) x86_64 
/usr/bin/python3 3.7.5rc1 (default, Oct  8 2019, 16:47:45) 
[GCC 9.2.1 20190909]
================================================================================
Using temporary directory /tmp/duplicity-i693xmwk-tempdir
Registering (mkstemp) temporary file 
/tmp/duplicity-i693xmwk-tempdir/mkstemp-egwfm57w-1
Temp has 2093543424 available, backup will use approx 272629760.
0 files exist on backend
3 files exist in cache
Extracting backup chains from list of files: 
['duplicity-full-signatures.20191018T163858Z.sigtar.part', 
'duplicity-full.20191018T163858Z.manifest.part']
File duplicity-full-signatures.20191018T163858Z.sigtar.part is not part of a 
known set; creating new set
Ignoring file (rejected by backup set) 
'duplicity-full-signatures.20191018T163858Z.sigtar.part'
File duplicity-full.20191018T163858Z.manifest.part is not part of a known set; 
creating new set
Processing local manifest 
b'/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-full.20191018T163858Z.manifest.part'
 (165)
Found manifest volume 1
Found 1 volumes in manifest
Found backup chain [Fri Oct 18 17:38:58 2019]-[Fri Oct 18 17:38:58 2019]
Local and Remote metadata are synchronized, no sync needed.
Last full backup left a partial set, restarting.
Last full backup date: Fri Oct 18 17:38:58 2019
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive directory: /home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613

Found 0 secondary backup chains.

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Fri Oct 18 17:38:58 2019
Chain end time: Fri Oct 18 17:38:58 2019
Number of contained backup sets: 1
Total number of contained volumes: 0
 Type of backup set:                            Time:   Number of volumes:
-------------------------
No orphaned or incomplete backup sets found.
PASSPHRASE variable not set, asking user.
GnuPG passphrase for decryption: 
PASSPHRASE variable not set, asking user.
Retype passphrase for decryption to confirm: 
Processing local manifest 
b'/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-full.20191018T163858Z.manifest.part'
 (165)
Found manifest volume 1
Found 1 volumes in manifest
RESTART: The first volume failed to upload before termination.
         Restart is impossible...starting backup from beginning.
Deleting 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-full-signatures.20191018T163858Z.sigtar.part
Deleting 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-full.20191018T163858Z.manifest.part
Releasing lockfile 
b'/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/lockfile'
Using archive dir: /home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613
Using backup name: 5fdb77f0e23a2029470bb8bbe5d05613
GPG binary is gpg, version (2, 2, 17)
Import of duplicity.backends.adbackend Succeeded
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.jottacloudbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pcabackend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
B2 Backend (path= , bucket= test-b2backend-grc, minimum_part_size= 100000000)
Bucket found
Main action: full
Acquiring lockfile 
b'/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/lockfile'
================================================================================
duplicity $version ($reldate)
Args: /usr/bin/duplicity -v9 full /tmp/b b2://XXXXXXXXXXX@test-b2backend-grc
Linux novatech 5.2.0-3-amd64 #1 SMP Debian 5.2.17-1 (2019-09-26) x86_64 
/usr/bin/python3 3.7.5rc1 (default, Oct  8 2019, 16:47:45) 
[GCC 9.2.1 20190909]
================================================================================
Using temporary directory /tmp/duplicity-qaypktp_-tempdir
Registering (mkstemp) temporary file 
/tmp/duplicity-qaypktp_-tempdir/mkstemp-r7awsztr-1
Temp has 2093543424 available, backup will use approx 272629760.
0 files exist on backend
1 file exists in cache
Extracting backup chains from list of files: []
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive directory: /home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613

Found 0 secondary backup chains.
No backup chains with active signatures found
No orphaned or incomplete backup sets found.
PASSPHRASE variable not set, asking user.
GnuPG passphrase for decryption: 
PASSPHRASE variable not set, asking user.
Retype passphrase for decryption to confirm: 
Using temporary directory 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-_m0i7wa_-tempdir
Registering (mktemp) temporary file 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-_m0i7wa_-tempdir/mktemp-f8kyxg1c-1
Using temporary directory 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-sblm1i43-tempdir
Registering (mktemp) temporary file 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-sblm1i43-tempdir/mktemp-rjoj9nic-1
AsyncScheduler: instantiating at concurrency 0
Registering (mktemp) temporary file 
/tmp/duplicity-qaypktp_-tempdir/mktemp-8dg4s2w7-2
Selecting /tmp/b
Comparing . and None
Getting delta of (. dir) and None
A .
Selection: examining path /tmp/b/hello
Selection:     + no selection functions found. Including
Selecting /tmp/b/hello
Comparing hello and None
Getting delta of (hello reg) and None
A hello
Removing still remembered temporary file 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-_m0i7wa_-tempdir/mktemp-f8kyxg1c-1
Removing still remembered temporary file 
/home/cobb/.cache/duplicity/5fdb77f0e23a2029470bb8bbe5d05613/duplicity-sblm1i43-tempdir/mktemp-rjoj9nic-1
AsyncScheduler: running task synchronously (asynchronicity disabled)
Writing duplicity-full.20191018T164139Z.vol1.difftar.gpg
Backtrace of previous error: Traceback (innermost last):
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 371, in 
inner_retry
    return fn(self, *args)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 531, in put
    self.__do_put(source_path, remote_filename)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 517, in 
__do_put
    self.backend._put(source_path, remote_filename)
  File "/usr/lib/python3/dist-packages/duplicity/backends/b2backend.py", line 
121, in _put
    log.Log(u"Put: %s -> %s" % (source_path.name, self.path + remote_filename), 
log.INFO)
 TypeError: can only concatenate str (not "bytes") to str

Attempt 1 failed. TypeError: can only concatenate str (not "bytes") to str



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_IE.utf8), LANGUAGE=en_GB (charmap=UTF-8) (ignored: LC_ALL set to 
en_IE.utf8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages duplicity depends on:
ii  gnupg              2.2.17-3
ii  libc6              2.29-2
ii  librsync2          2.0.2-1
ii  python3            3.7.5-1
ii  python3-fasteners  0.12.0-5
ii  python3-future     0.16.0-1
ii  python3-lockfile   1:0.12.2-2

Versions of packages duplicity recommends:
ii  python3-oauthlib  2.1.0-2
ii  python3-paramiko  2.6.0-1
ii  python3-pexpect   4.6.0-1
ii  python3-urllib3   1.24.1-1
ii  rsync             3.1.3-8

Versions of packages duplicity suggests:
pn  lftp                 <none>
pn  ncftp                <none>
pn  par2                 <none>
pn  python3-boto         <none>
ii  python3-pip          18.1-5
pn  python3-swiftclient  <none>
pn  tahoe-lafs           <none>

-- no debconf information

Reply via email to