** Changed in: duplicity
Importance: Undecided => Medium
** Changed in: duplicity
Status: New => Fix Committed
** Changed in: duplicity
Milestone: None => 0.8.13
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to duplicity in Ubuntu.
https://bugs.launchpad.net/bugs/1876778
Title:
MEGA.nz backend issues after "conversion" to Python 3 (patch attached)
Status in Duplicity:
Fix Committed
Status in duplicity package in Ubuntu:
New
Bug description:
Hello, despite I have never written anything in Python, it looks like
the problem is some automatic code "conversion" to make this
"duplicity" backend work with Python 3, or a similar issue, if the
fundamental issue is another please ignore and stick to the facts
below, thank you.
After upgrading from Ubuntu 18.04 LTS to 20.04 LTS, my "duplicity"-based
backup to offsite MEGA.nz stopped working. This is what I was getting as a
result (output shown for a fresh new test backup):
"""
export BACKUP_SOURCE="/tmp"
export BACKUP_DESTINATION="mega://[email protected]@mega.co.nz/Test_2"
# duplicity --full-if-older-than 30D ${BACKUP_SOURCE} ${BACKUP_DESTINATION}
mkdir: Test_2
megals: /Root/Test_2
Attempt 1 failed. TypeError: a bytes-like object is required, not 'str'
megals: /Root/Test_2
Attempt 2 failed. TypeError: a bytes-like object is required, not 'str'
megals: /Root/Test_2
Attempt 3 failed. TypeError: a bytes-like object is required, not 'str'
megals: /Root/Test_2
Attempt 4 failed. TypeError: a bytes-like object is required, not 'str'
megals: /Root/Test_2
Giving up after 5 attempts. TypeError: a bytes-like object is required, not
'str'
mkdir: Test_2
megals: /Root/Test_2
Attempt 1 failed. TypeError: a bytes-like object is required, not 'str'
megals: /Root/Test_2
Attempt 2 failed. TypeError: a bytes-like object is required, not 'str'
megals: /Root/Test_2
Attempt 3 failed. TypeError: a bytes-like object is required, not 'str'
"""
After some research found out some calls to Python were being given a
byte-like object instead of strings (str). So googled around and added
some ".decode()" calls at some points in which strings were expected
(some trial and error seeing all similar errors in the MEGA.nz backend
data flow. After doing so, the backend resumed working normally
(resulting patch against current "duplicity" package is attached). So
please make a good patch from the one attached as reference and please
make its way into the Ubuntu package ASAP (don't know if upstream
version is affected as well).
More details about my current system:
"""
# lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04
# apt-cache policy duplicity
duplicity:
Instalados: 0.8.11.1612-1
Candidato: 0.8.11.1612-1
Tabla de versión:
*** 0.8.11.1612-1 500
500 http://es.archive.ubuntu.com/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
"""
Hope you find this valuable.
To manage notifications about this bug go to:
https://bugs.launchpad.net/duplicity/+bug/1876778/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp