Bug 237339

Summary: [WinCairo][pywebsocket3] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 640: character maps to <undefined>
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Tools / TestsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, glenn, jbedard, stephan.szabo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 230319    
Bug Blocks:    
Attachments:
Description Flags
WIP patch (-X utf8)
none
WIP patch (PYTHONUTF8)
none
Patch ews-feeder: commit-queue-

Description Fujii Hironori 2022-03-01 12:55:38 PST
[WinCairo][pywebsocket3] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 640: character maps to <undefined>

After r290580 started to use pywebsocket3 and Python 3, WinCairo testing buildbot is failing.

Buildbot: builder WinCairo-64-bit-WKL-Release-Tests build 5738
https://build.webkit.org/#/builders/60/builds/5738

> webkitpy.layout_tests.servers.http_server_base.ServerError: Server exited

On my PC, pywebsocket.ws.log-err.txt has the following error message:

[2022-03-01 20:45:15,489] [CRITICAL] root: mod_pywebsocket: 'charmap' codec can't decode byte 0x9d in position 640: character maps to <undefined>
[2022-03-01 20:45:15,489] [CRITICAL] root: mod_pywebsocket: Traceback (most recent call last):
  File "C:\home\webkit\gb\LayoutTests\imported\w3c\web-platform-tests\tools\third_party\pywebsocket3\mod_pywebsocket\standalone.py", line 470, in _main
    server = WebSocketServer(options)
  File "C:\home\webkit\gb\LayoutTests\imported\w3c\web-platform-tests\tools\third_party\pywebsocket3\mod_pywebsocket\websocket_server.py", line 90, in __init__
    options.dispatcher = dispatch.Dispatcher(
  File "C:\home\webkit\gb\LayoutTests\imported\w3c\web-platform-tests\tools\third_party\pywebsocket3\mod_pywebsocket\dispatch.py", line 208, in __init__
    self._source_handler_files_in_dir(root_dir, scan_dir,
  File "C:\home\webkit\gb\LayoutTests\imported\w3c\web-platform-tests\tools\third_party\pywebsocket3\mod_pywebsocket\dispatch.py", line 373, in _source_handler_files_in_dir
    handler_suite = _source_handler_file(handler_file.read())
  File "C:\Python39\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 640: character maps to <undefined>
Comment 1 Fujii Hironori 2022-03-01 12:56:04 PST
Created attachment 453527 [details]
WIP patch (-X utf8)
Comment 2 Fujii Hironori 2022-03-01 13:01:00 PST
Created attachment 453530 [details]
WIP patch (PYTHONUTF8)
Comment 3 Fujii Hironori 2022-03-01 13:16:52 PST
Created attachment 453532 [details]
Patch
Comment 4 Fujii Hironori 2022-03-01 15:47:29 PST
Comment on attachment 453532 [details]
Patch

Clearing flags on attachment: 453532

Committed r290682 (247953@trunk): <https://commits.webkit.org/247953@trunk>
Comment 5 Fujii Hironori 2022-03-01 15:47:33 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2022-03-01 15:48:15 PST
<rdar://problem/89646388>