Closed Bug 1483850 Opened 2 years ago Closed 2 years ago

[mozprocess] Intermittent UnicodeEncodeError: 'ascii' codec can't encode characters in position 81-83: ordinal not in range(128)


(Testing :: Mozbase, defect, P5)

Version 3


(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 unaffected, firefox63 fixed)

Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- fixed


(Reporter: intermittent-bug-filer, Assigned: whimboo)



(Keywords: intermittent-failure, regression)

Filed by: hskupin [at]

There are a couple of those errors. Here one example:

23:37:39     INFO -  Traceback (most recent call last):
23:37:39     INFO -    File "c:\mozilla-build\python\Lib\", line 801, in __bootstrap_inner
23:37:39     INFO -
23:37:39     INFO -    File "c:\mozilla-build\python\Lib\", line 754, in run
23:37:39     INFO -      self.__target(*self.__args, **self.__kwargs)
23:37:39     INFO -    File "Z:\task_1534373372\build\venv\lib\site-packages\mozprocess\", line 1031, in _read
23:37:39     INFO -      callback(line.rstrip())
23:37:39     INFO -    File "Z:\task_1534373372\build\venv\lib\site-packages\mozprocess\", line 947, in __call__
23:37:39     INFO -      e(*args, **kwargs)
23:37:39     INFO -    File "Z:\task_1534373372\build\venv\lib\site-packages\mozprocess\", line 1079, in __call__
23:37:39     INFO -'iso8859-1') + '\n')
23:37:39     INFO -  UnicodeEncodeError: 'ascii' codec can't encode characters in position 81-83: ordinal not in range(128)
We should not release the version 1.0.0 before those failures have been fixed.
Flags: needinfo?(dave.hunt)
Pavel: Could you look into writing a failing test for this and see if you can fix it for both Python 2.7 and 3.5? Let me know if you have any questions. We should treat this as a priority so we can release mozprocess v1.0.0.
Flags: needinfo?(dave.hunt) → needinfo?(slepushkin)
1) I think, we are hitting this - (RESOLVED INCOMPLETE)
2) I've tried to write a test using cyrillic and simplified Chinese in UTF-8 (in - test worked, error has not reproduced (but I am not on Windows)

3) My first idea for fix would be
>        try:
>   + '\n')
>        except UnicodeDecodeError:
>            # TODO: Workaround for bug #991866 to make sure we can display when
>            # when normal UTF-8 display is failing
>  'iso8859-1') + '\n')


>'replace') + '\n')

but people in 991866 rejected it and without test - I don't know why.

Don't think this is very helpful ,sorry.
Flags: needinfo?(slepushkin)
Note that Windows is very special when it comes to Unicode. So to reproduce such a problem you should have a Windows machine or VM.
The actual work should now happen on bug 1428713. Marking this regression bug as fixed.
Closed: 2 years ago
Keywords: regression
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Assignee: nobody → hskupin
You need to log in before you can comment on or make changes to this bug.