Closed
Bug 1056859
Opened 10 years ago
Closed 5 years ago
UnicodeDecodeError in JarWriter when FileRegistry contains unicode strings
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: ahal, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/plain
|
Details |
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1051809#c14 After some debugging I discovered this was because I was using MozbuildObject.topobjdir as the FileFinder basedir which is unicode. Casting it to str() first fixed the issue. The attached test case fails. Removing the 'unicode_literals' import makes it work.
Comment 1•10 years ago
|
||
Yay for unicode_literals catching valid string handling bugs! You should u.encode('utf-8') instead of str(u), where u is a unicode type.
Updated•7 years ago
|
Product: Core → Firefox Build System
Comment 2•5 years ago
|
||
There was a comment mentioning this bug in /python/mozbuild/mozbuild/codecoverage/packager.py
The comment was removed in bug 1605264 and that file now imports unicode_literals.
Is this still valid?
Flags: needinfo?(ahal)
Reporter | ||
Comment 3•5 years ago
|
||
I'm not sure, but probably not. I have no recollection of this issue and seeing as it is 5 years old, let's file a new one if it comes up again.
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(ahal)
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•