`generate_report()` sometimes gives `TypeError: sequence item 0: expected str instance, list found`
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
- Ambito
- accessibility, testing
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
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:
- check out: https://github.com/pycascades/pycascades-2026/tree/39a2096a0edda50c3161cba6b5be232e87b462a6
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pamelafox/axe-playwright-python
-
Upgrade axe Aperta
pamelafox/axe-playwright-python#27 · 1 reazione · 2 assegnatari ·
Tutte le issue di pamelafox/axe-playwright-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stephrobert/dsoxlab#238 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sublimehq/package_control#1780 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
nwg-piotr/nwg-displays#145 ·