UnicodeDecodeError in lp-project-upload
Bug #1905450 reported by
James Falcon
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lptools |
New
|
Undecided
|
Unassigned | ||
lptools (Debian) |
New
|
Unknown
|
Bug Description
$ lp-project-upload cloud-init 20.4 cloud-init-
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
file_content = open(tarball, 'r').read()
File "/usr/lib/
(result, consumed) = self._buffer_
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
Changed in lptools (Debian): | |
status: | Unknown → New |
To post a comment you must log in.
Applying the below as quilt patch addressed both this and a related issue locally, meaning I could use this command successfully:
--- a/bin/lp- project- upload project- upload
release = create_ release( proj, version)
+++ b/bin/lp-
@@ -123,7 +123,7 @@
# Get the file contents. exists( signature) :
print( 'gpg failed, aborting', file=sys.stderr)
- file_content = open(tarball, 'r').read()
+ file_content = open(tarball, 'rb').read()
# Get the signature, if available.
signature = tarball + '.asc'
if not os.path.
@@ -133,7 +133,7 @@
if os.path. exists( signature) :
signature _content = None
- signature_content = open(signature, 'r').read()
+ signature_content = open(signature, 'rb').read()
else: