Error when using S3 multipart upload - TypeError: cannot use a string pattern on a bytes-like object
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Invalid
|
Medium
|
Unassigned | ||
duplicity (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I followed the solution in https:/
Note: This problem doesn't appear to exist in duplicity 0.7.17 running on python2.7, which is making me wonder if this is a python3.8 related issue.
user@host:~$ lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04
user@host:~$ apt-cache policy duplicity
duplicity:
Installed: 0.8.19-
Candidate: 0.8.19-
Version table:
*** 0.8.19-
500 http://
100 /var/lib/
0.8.11.1612-1 500
500 http://
Start duply v2.2, time is 2021-06-02 22:58:11.
Using profile '/root/
Using installed duplicity version 0.8.19, python 3.8.5 (/usr/bin/python3), gpg 2.2.19 (Home: /root/.gnupg), awk 'GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)', grep 'grep (GNU grep) 3.4', bash '5.0.17(1)-release (x86_64-
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - En/Decryption skipped. (GPG disabled)
--- Start running command PRE at 22:58:11.550 ---
Skipping n/a script '/root/
--- Finished state OK at 22:58:11.563 - Runtime 00:00:00.013 ---
--- Start running command BKP at 22:58:11.595 ---
Using archive dir: /root/.
Using backup name: duply_artifacto
GPG binary is gpg, version (2, 2, 19)
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Multiprocessing is not supported on linux, will use threads instead.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Setting multipart boto backend process pool to 4 processes
Reading globbing filelist /root/.
Main action: inc
Acquiring lockfile b'/root/
=======
duplicity 0.8.19
Args: /usr/bin/duplicity --name duply_artifacto
Linux ip-172-30-115-92 5.4.0-1047-aws #49-Ubuntu SMP Wed Apr 28 22:47:04 UTC 2021 x86_64 x86_64
/usr/bin/python3 3.8.5 (default, May 27 2021, 13:30:53)
[GCC 9.3.0]
===============
Log errors:
Attempt 4 failed. BackendException: Multipart upload failed. Aborted.
Writing duplicity-
Uploading s3://s3-
Uploading 1073705932 bytes in 2 chunks
Waiting for the pool to finish processing 2 tasks
Thread-29: Uploading chunk 1
Thread-30: Uploading chunk 2
Thread-30: Upload of chunk 2 failed. Retrying 4 more times...
Thread-30: Uploading chunk 2
Thread-29: Upload of chunk 1 failed. Retrying 4 more times...
Thread-29: Uploading chunk 1
Thread-30: Upload of chunk 2 failed. Retrying 3 more times...
Thread-30: Uploading chunk 2
Thread-29: Upload of chunk 1 failed. Retrying 3 more times...
Thread-29: Uploading chunk 1
Thread-30: Upload of chunk 2 failed. Retrying 2 more times...
Thread-30: Uploading chunk 2
Thread-29: Upload of chunk 1 failed. Retrying 2 more times...
Thread-29: Uploading chunk 1
Thread-30: Upload of chunk 2 failed. Retrying 1 more times...
Thread-30: Uploading chunk 2
Thread-29: Upload of chunk 1 failed. Retrying 1 more times...
Thread-29: Uploading chunk 1
Thread-30: Upload of chunk 2 failed. Retrying 0 more times...
Thread-30: Uploading chunk 2
Thread-29: Upload of chunk 1 failed. Retrying 0 more times...
Thread-29: Uploading chunk 1
Thread-30: Upload of chunk 2 failed. Aborting...
Thread-29: Upload of chunk 1 failed. Aborting...
Part upload not successful, aborting multipart upload.
A process pool already exists. Destroying previous pool.
Setting multipart boto backend process pool to 4 processes
Done waiting for the pool to finish processing
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib/
return fn(self, *args)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise BackendExceptio
duplicity.
=========
Traceback (most recent call last):
File "/usr/lib/
mp.
File "/usr/lib/
key.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
return _db.guess_type(url, strict)
File "/usr/lib/
scheme, url = urllib.
File "/usr/lib/
match = _typeprog.
TypeError: cannot use a string pattern on a bytes-like object
Changed in duplicity (Ubuntu): | |
status: | Incomplete → In Progress |
Changed in duplicity: | |
status: | New → In Progress |
assignee: | nobody → Kenneth Loafman (kenneth-loafman) |
milestone: | none → 0.8.20 |
importance: | Undecided → Medium |
Changed in duplicity (Ubuntu): | |
status: | In Progress → New |
It's not in duplicity, but in urllib. Do this to upgrade all modules we use:
$ sudo python3 -m pip install -U -r requirements.txt
where requirements.txt is from:
https:/ /git.launchpad. net/duplicity/ plain/requireme nts.txt
Let me know how it goes.