Closed Bug 847256 Opened 7 years ago Closed 7 years ago

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


(Testing :: Marionette, defect)

Not set


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

Tracking Status
firefox22 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed


(Reporter: allstars.chh, Assigned: jgriffin)




(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.

The error's stack trace is:

02:49:39     INFO -    File "/home/cltbld/talos-slave/test/build/tests/marionette/marionette/", 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/", line 68, in printLogs
02:49:39     INFO -' '.join(line))
02:49:39     INFO -    File "/usr/lib/python2.6/", 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.
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+
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.