一段时间以来,我一直在成功地使用 duplicity 备份到 GCS,但几个月前它停止了工作。我相信迁移到 Python 3 会出现编码问题。我已经看到了一些类似的问题(例如,https ://bugs.launchpad.net/duplicity/+bug/1843995 )声称类似的错误已经解决,但是我仍然得到以下信息:
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