Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#19 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
playwright, python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
30
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pamelafox/axe-playwright-python

Tutte le issue di pamelafox/axe-playwright-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.