Skip to content

Error parsing log message  #25

@jrbourbeau

Description

@jrbourbeau

Over in dask/dask we started getting this error recently:

Traceback (most recent call last):
Parsing logs ...
  File "/home/runner/work/_actions/xarray-contrib/issue-from-pytest-log/v1.2.6/parse_logs.py", line 233, in <module>
    preformatted = [preformat_report(report) for report in failed]
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/xarray-contrib/issue-from-pytest-log/v1.2.6/parse_logs.py", line 233, in <listcomp>
    preformatted = [preformat_report(report) for report in failed]
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda3/envs/test-environment/lib/python3.11/functools.py", line 909, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/xarray-contrib/issue-from-pytest-log/v1.2.6/parse_logs.py", line 92, in _
    message = report.longrepr.chain[0][1].message
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'message'

See this CI build for a concrete example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions