duplicity 0.8 report "sequence item 0: expected str instance, int found" when full back to remote SSH service

Bug #1831178 reported by lijian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Duplicity version: 0.8.0
Python version: Python 3.6
OS Distro and version: LFS
Type of target filesystem: ext4

Log:
# duplicity full /tmp sftp://***/t3 -v 9
Using archive dir: /root/.cache/duplicity/b4d5ebf645ee2d004a6b7565d3b19a46
Using backup name: b4d5ebf645ee2d004a6b7565d3b19a46
GPG binary is gpg, version (2, 2, 13)
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
/usr/local/lib64/python3.6/site-packages/duplicity/backends/ssh_paramiko_backend.py:410: ResourceWarning: unclosed file <_io.TextIOWrapper name='/etc/ssh/ssh_config' mode='r' encoding='UTF-8'>
  sshconfig.parse(open(file))
ssh: starting thread (client mode): 0x4ca41470
ssh: Local version/idstring: SSH-2.0-paramiko_2.4.2
ssh: Remote version/idstring: SSH-2.0-OpenSSH_7.4
ssh: Connected (version 2.0, client OpenSSH_7.4)
ssh: kex algos:['curve25519-sha256', '<email address hidden>', 'ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group16-sha512', 'diffie-hellman-group18-sha512', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha256', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'rsa-sha2-512', 'rsa-sha2-256', 'ecdsa-sha2-nistp256', 'ssh-ed25519'] client encrypt:['<email address hidden>', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr', '<email address hidden>', '<email address hidden>', 'aes128-cbc', 'aes192-cbc', 'aes256-cbc', 'blowfish-cbc', 'cast128-cbc', '3des-cbc'] server encrypt:['<email address hidden>', 'aes128-ctr', 'aes192-ctr', 'aes256-ctr', '<email address hidden>', '<email address hidden>', 'aes128-cbc', 'aes192-cbc', 'aes256-cbc', 'blowfish-cbc', 'cast128-cbc', '3des-cbc'] client mac:['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] server mac:['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', 'hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] client compress:['none', '<email address hidden>'] server compress:['none', '<email address hidden>'] client lang:[''] server lang:[''] kex follows?False
ssh: Kex agreed: ecdh-sha2-nistp256
ssh: HostKey agreed: ssh-ed25519
ssh: Cipher agreed: aes128-ctr
ssh: MAC agreed: hmac-sha2-256
ssh: Compression agreed: none
/usr/local/lib/python3.6/site-packages/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  m.add_string(self.Q_C.public_numbers().encode_point())
/usr/local/lib/python3.6/site-packages/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/usr/local/lib/python3.6/site-packages/paramiko/kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  hm.add_string(self.Q_C.public_numbers().encode_point())
ssh: kex engine KexNistp256 specified hash_algo <built-in function openssl_sha256>
ssh: Switch to new keys ...
Using temporary directory /tmp/duplicity-udd2hwgb-tempdir
Backend error detail: Traceback (innermost last):
  File "/usr/local/bin/duplicity", line 1706, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1692, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1525, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib64/python3.6/site-packages/duplicity/commandline.py", line 1202, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/local/lib64/python3.6/site-packages/duplicity/commandline.py", line 1073, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/local/lib64/python3.6/site-packages/duplicity/backend.py", line 228, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/local/lib64/python3.6/site-packages/duplicity/backend.py", line 214, in get_backend_object
    return factory(pu)
  File "/usr/local/lib64/python3.6/site-packages/duplicity/backends/ssh_paramiko_backend.py", line 248, in __init__
    self.config[u'port'], e))
 duplicity.errors.BackendException: ssh connection to *** failed: sequence item 0: expected str instance, int found

BackendException: ssh connection to *** failed: sequence item 0: expected str instance, int found

Revision history for this message
lijian (ddljdd) wrote :

the issue is in this line:
ssh_paramiko_backend.py
line 106: fingerprint = u':'.join( a + b for a, b in list(zip(fp[::2], fp[1::2])))
python3 doesn't support join an integer list. we need convert it to string first.

Changed in duplicity:
milestone: none → 0.8.01
status: New → Fix Committed
importance: Undecided → Medium
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.