Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`generate_report()` sometimes gives `TypeError: sequence item 0: expected str instance, list found`

Đang mở
#19 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
playwright, python
Lĩnh vực
accessibility, testing

Hướng nghiên cứu

Start with tests/test_axe.py at the assert around line 104 and reproduce the failure using uv run --with-requirements tests/requirements.txt pytest tests. Trace generate_report() into __violation_report, where joining node["target"] raises the TypeError. Done means findings print as expected and the test suite passes for reports containing these nodes.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Describe the bug
For some, but not all, reports, I'm seeing this error:

    def __violation_report(self, violation: dict, template: Template) -> str:
        nodes_str = ""
        for num, node in enumerate(violation["nodes"], start=1):
>           targets = ", ".join(node["target"])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
E           TypeError: sequence item 0: expected str instance, list found

To Reproduce

Steps to reproduce the behavior:

  1. check out: https://github.com/pycascades/pycascades-2026/tree/39a2096a0edda50c3161cba6b5be232e87b462a6
  2. uv run --with-requirements tests/requirements.txt pytest tests

Expected behavior
When findings are found, the assert here should print the findings

Logs
As a workaround, I dumped the results here:
results.txt

Additional context
Add any other context about the problem here.

Ngôn ngữ chính
Python
Star
31
Fork
9
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pamelafox/axe-playwright-python

Tất cả issue của pamelafox/axe-playwright-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.