Skip to content

Log the XHarness diagnostics file content when failed to parse#9045

Merged
premun merged 3 commits intodotnet:mainfrom
premun:prvysoky/diagnostics
Apr 13, 2022
Merged

Log the XHarness diagnostics file content when failed to parse#9045
premun merged 3 commits intodotnet:mainfrom
premun:prvysoky/diagnostics

Conversation

@premun
Copy link
Copy Markdown
Member

@premun premun commented Apr 13, 2022

I have seen following error in the logs:

Traceback (most recent call last):
  File "/datadisks/disk1/work/ACE10989/w/9CD40882/u/xharness-event-processor.py", line 249, in <module>
    operations = json.load(open(diagnostics_file))
  File "/usr/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 3 (char 2)

I don't understand how the file can be invalid since it is produced by C# serializer.

Comment thread src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py Outdated
@premun premun merged commit 50ccb4f into dotnet:main Apr 13, 2022
@premun premun deleted the prvysoky/diagnostics branch April 13, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants