Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 414  / 1 Year ago, thu, april 6, 2023, 10:39:34

I had been using duplicity successfully to backup to GCS for some time but a few months ago it stopped working. I believe there's an encoding problem with moving to Python 3. I have seen a few similar problems floating around (e.g., https://bugs.launchpad.net/duplicity/+bug/1843995) which claim that similar bugs are resolved, but I'm still getting the following:


Traceback (innermost last):
File "/usr/bin/duplicity", line 106, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 92, in with_tempdir
fn()
File "/usr/lib/python3/dist-packages/duplicity/dup_main.py", line 1525, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/lib/python3/dist-packages/duplicity/commandline.py", line 1175, in ProcessCommandLine
globals.backend = backend.get_backend(args[0])
File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 225, in get_backend
obj = get_backend_object(url_string)
File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 211, in get_backend_object
return factory(pu)
File "/usr/lib/python3/dist-packages/duplicity/backends/_boto_single.py", line 173, in __init__
self.resetConnection()
File "/usr/lib/python3/dist-packages/duplicity/backends/_boto_single.py", line 198, in resetConnection
self.bucket = self.conn.create_bucket(self.bucket_name,
File "/usr/lib/python3/dist-packages/boto/gs/connection.py", line 93, in create_bucket
response = self.make_request(
File "/usr/lib/python3/dist-packages/boto/s3/connection.py", line 659, in make_request
auth_path = self.calling_format.build_auth_path(bucket, key)
File "/usr/lib/python3/dist-packages/boto/s3/connection.py", line 94, in build_auth_path
path = '/' + bucket
TypeError: can only concatenate str (not "bytes") to str

More From » duplicity

 Answers
2

your probably not using the latest https://launchpad.net/duplicity/+milestone/0.8.14 .


lots of encoding errors have been fixed since the port to python3.


in case you are backing up to S3 there is also the new boto3+s3:// based on the maintained boto3 module.


here the install notes from the release announcement (take care to remove the distro's duplicity as suggested in the bottom first)



There are multiple options both stable and daily:



NOTE: UNinstall duplicity first if it was installed via the distribution repository. For Ubuntu, that would be "sudo apt-get purge duplicity".



..ede/duply.net


[#3058] Saturday, April 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
vigorousom

Total Points: 394
Total Questions: 96
Total Answers: 110

Location: Pitcairn Islands
Member since Fri, Oct 15, 2021
3 Years ago
vigorousom questions
Thu, Oct 6, 22, 16:53, 2 Years ago
Sun, May 15, 22, 08:14, 2 Years ago
Thu, Aug 25, 22, 07:55, 2 Years ago
;