Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axe-core parse error #10487

Closed
fniessink opened this issue Dec 10, 2024 · 0 comments · Fixed by #10489
Closed

Axe-core parse error #10487

fniessink opened this issue Dec 10, 2024 · 0 comments · Fixed by #10489
Assignees
Labels
Bug Something isn't working

Comments

@fniessink
Copy link
Member

fniessink commented Dec 10, 2024

Describe the bug
Quality-time fails to parse this Axe-core JSON output:

[
    {
        "testEngine": {
            "name": "axe-core", 
            "version": "4.10.2"
        },
        "testEnvironment": {
            "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/130.0.6723.31 Safari/537.36",
            "windowWidth": 1280,
            "windowHeight": 720,
            "orientationAngle": 0.0,
            "orientationType": "landscape-primary"
        },
       "timestamp": "2024-12-09T12:16:17.441Z",
       "url": "https://example.org"
   }
]

Traceback:

Traceback (most recent call last):
  File "/home/collector/base_collectors/source_collector.py", line 146, in __safely_parse_source_responses
    return await self._parse_source_responses(responses)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/collector/base_collectors/source_collector.py", line 159, in _parse_source_responses
    included_entities = [entity for entity in await self._parse_entities(responses) if self._include_entity(entity)]
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/collector/base_collectors/file_source_collector.py", line 113, in _parse_entities
    entities.extend(self._parse_json(json, filename))
                    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/collector/source_collectors/axe_core/violations.py", line 64, in _parse_json
    entity_attributes.extend(self.__parse_violations(violations, url))
                             ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/collector/source_collectors/axe_core/violations.py", line 82, in __parse_violations
    for violation in violations_by_result_type:
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

Your environment (please complete the following information):

  • Quality-time v5.20.0
@fniessink fniessink added the Bug Something isn't working label Dec 10, 2024
@fniessink fniessink moved this from Inbox to Development in progress in Quality-time backlog Dec 10, 2024
@fniessink fniessink self-assigned this Dec 10, 2024
fniessink added a commit that referenced this issue Dec 10, 2024
@fniessink fniessink linked a pull request Dec 10, 2024 that will close this issue
@fniessink fniessink moved this from Development in progress to Reviewing in progress in Quality-time backlog Dec 10, 2024
fniessink added a commit that referenced this issue Dec 11, 2024
fniessink added a commit that referenced this issue Dec 11, 2024
fniessink added a commit that referenced this issue Dec 11, 2024
@github-project-automation github-project-automation bot moved this from Reviewing in progress to Merged in Quality-time backlog Dec 11, 2024
@fniessink fniessink moved this from Merged to Release candidate released in Quality-time backlog Dec 12, 2024
@fniessink fniessink moved this from Release candidate released to Released in Quality-time backlog Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

1 participant