Closed Bug 1915354 Opened 2 months ago Closed 2 months ago

Perma [DON'T USE FOR CLASSIFICATION] TypeError: string argument expected, got 'bytes'

Categories

(Testing :: Mozbase, defect, P5)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr128 fixed, firefox129 unaffected, firefox130 unaffected, firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- fixed
firefox129 --- unaffected
firefox130 --- unaffected
firefox131 --- fixed

People

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

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Filed by: mh [at] glandium.org
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=472026936&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/F1bwC1o_Sk6z0NnW2jZziA/runs/0/artifacts/public/logs/live_backing.log


[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -  HEY! If you're reading this, you're about to encounter a type error, probably as a result of a conversion from Python 2 to Python 3. This is almost definitely because you're trying to write binary data to a text-encoded stream, or text data to a binary-encoded stream. Check how you're instantiating your ProcessHandler and if the output should be text-encoded, make sure you pass universal_newlines=True.
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -  Traceback (most recent call last):
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -    File "D:\task_172480899344158\build\venv\Lib\site-packages\mozprocess\processhandler.py", line 1128, in _read
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -      callback(line.rstrip())
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -    File "D:\task_172480899344158\build\venv\Lib\site-packages\mozprocess\processhandler.py", line 1036, in __call__
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -      e(*args, **kwargs)
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -    File "D:\task_172480899344158\build\venv\Lib\site-packages\mozprocess\processhandler.py", line 1178, in __call__
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -      self.stream.write(ensure(line, errors="ignore") + ensure("\n"))
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -    File "<frozen codecs>", line 378, in write
[task 2024-08-28T01:42:19.472Z] 01:42:19     INFO -  TypeError: string argument expected, got 'bytes'

This looks like something that was wrong before bug 1906191 was made worse. I'm trying to determine where this is coming from.

Assignee: nobody → mh+mozilla
Keywords: regression
Regressed by: 1906191

Set release status flags based on info from the regressing bug 1906191

While here, avoid wrapping sys.stdout when it's already encoded to
utf-8.

Summary: Perma TypeError: string argument expected, got 'bytes' → Perma [DON'T USE FOR CLASSIFICATION] TypeError: string argument expected, got 'bytes'
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/51b2cd490529 Don't create invalid text streams off sys.stdout. r=webdriver-reviewers,whimboo
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: