UnicodeDecodeError when trying to display text summary to stdout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PlainBox (Toolkit) |
Fix Released
|
High
|
Sylvain Pineau |
Bug Description
When testing device 201701-25364, the session ends normally, but when checkbox wants to display the test summary to stdout, it crashes with the following error:
-------
Reports will be saved to: /home/u/
ERROR:plainbox.
Traceback (most recent call last):
File "/usr/lib/
return self._dispatch()
File "/usr/lib/
result = ingredient.
File "/usr/lib/
return self._dispatch(
File "/usr/lib/
return self._dispatch_
File "/usr/lib/
return self._dispatch(
File "/usr/lib/
retval = command.
File "/usr/lib/
self.
File "/usr/lib/
exporter_id, transport)
File "/usr/lib/
raise exc
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
result = transport.
File "/usr/lib/
copyfileobj
File "/usr/lib/
fdst.write(buf)
File "/usr/lib/
return self.dest_
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 16383: unexpected end of data
Please report a bug including the information from the paragraph above. To
report the bug visit https:/
We are sorry for the inconvenience!
-------
We can still manually export the session using the following command:
plainbox session export -f xml -o /tmp/submission.xml <session_id>
Related branches
- Maciej Kisielewski (community): Approve
- Sylvain Pineau (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedplainbox/impl/transport.py (+1/-1)
affects: | plainbox-provider-certification-client → plainbox |
tags: | added: ce-qa-concern |
Changed in plainbox: | |
importance: | Undecided → High |
Changed in plainbox: | |
status: | Triaged → Fix Committed |
Changed in plainbox: | |
status: | Fix Committed → Fix Released |
This happens when Checkbox displays the text summary at the end of the test run.
This happens because the data stream seems to be truncated when it's about to display the checked mark sigil (☑ or, in utf-8, "0xE2 0x98 0x91") for job `suspend/ bluetooth_ obex_send_ after_suspend` .
We could not determine the root cause yet.
Knowing that the text summary displayed on screen at the end of a run is for reference only, (1) it shouldn't prevent the creation of the actual submission file and (2) it's not a big deal if a check mark is missing from it.
To address (1), we could first create the submission files (xml, json, etc.), then display the text summary to stdout (currently it's the other way around). The part to upload the submission file would still be at the end of the whole process, but this part can be run manually.
For (2), we can just use, in plainbox/ impl/exporter/ __init_ _.py,
return self.dest_ stream. write(data. decode( self.encoding, errors='ignore'))
instead of
return self.dest_ stream. write(data. decode( self.encoding) )
when the destination stream is the screen (stdout).