addAttachment() crashes with UnicodeDecodeError:
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Fix Released
|
High
|
Leonard Richardson |
Bug Description
The retracer just crashed with
Traceback (most recent call last):
File "/tmp/tmp0Lq7Ny
crashdb.
File "/usr/lib/
is_patch=False)
File "/usr/lib/
args[key] = simplejson.
File "/var/lib/
**kw)
File "/var/lib/
return encode_
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 627: unexpected code byte
on
when processing bug 353433.
Changed in launchpadlib: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in launchpadlib: | |
status: | Fix Committed → Fix Released |
Reproducer (works on staging):
b=lp.bugs[89040] (comment= '', data=open( 'thread. txt').read( ), description= 'test353805' , filename= 'test353805' , is_patch=False)
b.addAttachment
This apparently happens because something in launchpadlib assumes that data is UTF-8 encoded. While stack traces are by and large text, they can have binary stuff in it, such as this one.