MEGA.nz backend issues after "conversion" to Python 3 (patch attached)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned | ||
duplicity (Ubuntu) |
Fix Committed
|
Undecided
|
Unassigned |
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_
export BACKUP_
# duplicity --full-
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://
100 /var/lib/
"""
Hope you find this valuable.
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.8.13 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
Changed in duplicity (Ubuntu): | |
status: | New → Fix Committed |
The attachment "Tentative patch to fix current "duplicity" MEGA.nz backend issue with bytes / string objects" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]