Bug 226904 - check-webkit-style failing with TypeError: cannot use a string pattern on a bytes-like object
Summary: check-webkit-style failing with TypeError: cannot use a string pattern on a b...
Status: RESOLVED DUPLICATE of bug 226925
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-10 16:23 PDT by Ryan Haddad
Modified: 2021-06-11 20:08 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2021-06-10 16:23:41 PDT
python3 Tools/Scripts/check-webkit-style
 in dir /Volumes/Data/worker/Style-EWS/build (timeout 1200 secs)
 watching logfiles {}
 argv: [b'python3', b'Tools/Scripts/check-webkit-style']
 using PTY: False
Traceback (most recent call last):
  File "Tools/Scripts/check-webkit-style", line 46, in <module>
    sys.exit(CheckWebKitStyle().main())
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/main.py", line 159, in main
    patch_checker.check(patch)
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/patchreader.py", line 86, in check
    self._text_file_reader.process_file(file_path=path, line_numbers=line_numbers)
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/filereader.py", line 137, in process_file
    self._processor.process(lines, file_path, **kwargs)
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/checker.py", line 1038, in process
    checker.check(lines)
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/checkers/jstest.py", line 104, in check
    self.check_js_test_functions()
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/checkers/jstest.py", line 125, in check_js_test_functions
    baseline_function_map = map_functions_to_dict(baseline_content)
  File "/Volumes/Data/worker/Style-EWS/build/Tools/Scripts/webkitpy/style/checkers/jstest.py", line 63, in map_functions_to_dict
    functions = re.split(r'^function\s+', content, flags=re.MULTILINE)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/re.py", line 213, in split
    return _compile(pattern, flags).split(string, maxsplit)
TypeError: cannot use a string pattern on a bytes-like object


Seen on https://ews-build.webkit.org/#/builders/6/builds/49707, which was testing the patch for https://bugs.webkit.org/show_bug.cgi?id=226902
Comment 1 Ryan Haddad 2021-06-10 16:24:00 PDT
rdar://79166108
Comment 2 Jonathan Bedard 2021-06-10 17:03:20 PDT
Probably need to change some of these regexes to byte regex
Comment 3 Alexey Proskuryakov 2021-06-11 19:50:06 PDT
Did this get fixed via bug 226925?
Comment 4 Ryan Haddad 2021-06-11 20:08:34 PDT
(In reply to Alexey Proskuryakov from comment #3)
> Did this get fixed via bug 226925?
Yep, I guess Jonathan used that bug instead.

*** This bug has been marked as a duplicate of bug 226925 ***