Closed Bug 847256 Opened 7 years ago Closed 7 years ago

UnicodeEncodeError: 'ascii' codec can't encode character when running TBPL marionette tests

Categories

(Testing :: Marionette, defect)

x86_64
Linux
defect
Not set

Tracking

(firefox22 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

RESOLVED FIXED
mozilla22
Tracking Status
firefox22 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: allstars.chh, Assigned: jgriffin)

References

Details

Attachments

(1 file)

When running try server for B2G marionette tests (Bug 797296), we met one UnicodeEncodeError, see [1], and 
This test script will run some tests to verify the decoding of the raw PDU so some of them will be Japanese or Chinese characters.

We ran these tests well on our PCs however it failed in TBPL.
So it seems TBPL cannot accept characters encoded in Japanese or Chinese.


[1]: https://tbpl.mozilla.org/?tree=Try&rev=15684a551bbc
The error's stack trace is:

02:49:39     INFO -    File "/home/cltbld/talos-slave/test/build/tests/marionette/marionette/runtests.py", line 137, in run
02:49:39     INFO -      result.printLogs(test)
02:49:39     INFO -    File "/home/cltbld/talos-slave/test/build/tests/marionette/marionette/runtests.py", line 68, in printLogs
02:49:39     INFO -      self.stream.writeln(' '.join(line))
02:49:39     INFO -    File "/usr/lib/python2.6/unittest.py", line 665, in writeln
02:49:39     INFO -      if arg: self.write(arg)
02:49:39     INFO -  UnicodeEncodeError: 'ascii' codec can't encode character u'\u30eb' in position 131: ordinal not in range(128)
Can you see if this patch fixes the problem?
Assignee: nobody → jgriffin
We have tried but currently TPBL met errors from Bug 847683,
will try your patch again once it's fixed.
Hi, Griffin
The patch seems okay, now the TPBL passed, without complaining EncodeError.

https://tbpl.mozilla.org/?tree=Try&rev=42ea5b7953b6
Comment on attachment 720948 [details] [diff] [review]
Handle non-ascii chars in log data

Seems Griffin is not around,
I sent r? to mdas on Griffin's behalf.
Attachment #720948 - Flags: review?(mdas)
ping? Griffin and Das?
Comment on attachment 720948 [details] [diff] [review]
Handle non-ascii chars in log data

Review of attachment 720948 [details] [diff] [review]:
-----------------------------------------------------------------

My apologies, my patch review queue is a bit backed up. I'll land it in m-i/m-c
Attachment #720948 - Flags: review?(mdas) → review+
https://hg.mozilla.org/mozilla-central/rev/e1538a45f97b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.