This issue has already been fixed in the newest duplicity, but you are likely not using that version.
TL;DR The b2 package on which duplicity b2 backend depends has had breaking changes, which are not accounted for in older duplicity versions. Upgrade duplicity using additional repos or downgrade b2 using pip2 install b2==1.0.0.
This is relevant for duplicity 0.7.17. This has supposedly been fixed in 0.7.18 (https://launchpad.net/duplicity/+milestone/0.7.18). This is definitely fixed in duplicity 0.8.17
This is relevant because duplicity 0.7.17 is the last version that Ubuntu 18.04.5 LTS installs without adding external repositories. As newer Ubuntu LTS has only recently been released, this might cause problems for quite a lot of people.
To fix:
$ sudo add-apt-repository ppa:duplicity-team/ppa $ sudo apt-get update $ sudo apt-get --only-upgrade install duplicity
If you'd rather use a gui, try gnome-software (Ubuntu Software Center). At the time of writing, it carries duplicity 0.8.* , which should work.
I came across this issue while trying to set up duplicity to backup to B2.
The main issue is that the b2 package version is not frozen in the requirements file or the instructions provided to the user.
Current versions (2+, probably since 1.4 when b2sdk was created) do not include the b2.api module, or any of those imported in B2Backend's init. It was moved into a separate b2sdk package, and b2 is now mostly a cli wrapper.
This causes some imports to fail, leading to the message 'BackendException: B2 backend requires B2 Python APIs (pip install b2)'. This is the only information provided, unless you increase the verbosity (duplicity -v9 foo bar).
Downgrading b2 solves this issue, but you need to remember to use pip2. This took me longer to diagnose than I am willing to admit.
I did not determine the exact maximum supported version. 1.0.0 works for me. The main breaking change occured in b2==1.4.0, but some lower versions yield different errors (some class is not a context manager when it should be).
Please be aware that this repo is not the main duplicity repo and is just a slightly outdated fork. For the main one, head to https://gitlab.com/duplicity .
This issue has already been fixed in the newest duplicity, but you are likely not using that version.
TL;DR The b2 package on which duplicity b2 backend depends has had breaking changes, which are not accounted for in older duplicity versions. Upgrade duplicity using additional repos or downgrade b2 using
pip2 install b2==1.0.0.This is relevant for duplicity 0.7.17. This has supposedly been fixed in 0.7.18 (https://launchpad.net/duplicity/+milestone/0.7.18). This is definitely fixed in duplicity 0.8.17
This is relevant because duplicity 0.7.17 is the last version that Ubuntu 18.04.5 LTS installs without adding external repositories. As newer Ubuntu LTS has only recently been released, this might cause problems for quite a lot of people.
To fix:
$ sudo add-apt-repository ppa:duplicity-team/ppa $ sudo apt-get update $ sudo apt-get --only-upgrade install duplicityIf you'd rather use a gui, try gnome-software (Ubuntu Software Center). At the time of writing, it carries duplicity 0.8.* , which should work.
I came across this issue while trying to set up duplicity to backup to B2.
The main issue is that the b2 package version is not frozen in the requirements file or the instructions provided to the user.
Current versions (2+, probably since 1.4 when b2sdk was created) do not include the b2.api module, or any of those imported in B2Backend's init. It was moved into a separate b2sdk package, and b2 is now mostly a cli wrapper.
This causes some imports to fail, leading to the message 'BackendException: B2 backend requires B2 Python APIs (pip install b2)'. This is the only information provided, unless you increase the verbosity (duplicity -v9 foo bar).
Downgrading b2 solves this issue, but you need to remember to use pip2. This took me longer to diagnose than I am willing to admit.
I did not determine the exact maximum supported version. 1.0.0 works for me. The main breaking change occured in b2==1.4.0, but some lower versions yield different errors (some class is not a context manager when it should be).
Please be aware that this repo is not the main duplicity repo and is just a slightly outdated fork. For the main one, head to https://gitlab.com/duplicity .