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

Tracking UI returns HTTP 500 on all pages with Starlette ≥1.0 (TemplateResponse signature)

Aperta Adatta ai principianti
#809 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
85/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
fastapi, python
Ambito
backend

Direzione di ricerca

Leggi burr/tracking/server/run.py nel punto di ingresso react_app e controlla la chiamata a TemplateResponse intorno alla riga 341. Riproduci il malfunzionamento della UI di tracking con Starlette 1.0 o versione successiva, quindi verifica che l’index.html servito restituisca HTTP 200; controlla anche la configurazione delle dipendenze di burr[start] se aggiungi la versione minima suggerita di Starlette.

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

Descrizione

status/needs-triage

Summary

The tracking UI server (burr / burr-admin-server) returns HTTP 500 on every page when Starlette ≥1.0 is installed. The JSON API is unaffected — only the served React app (index.html) fails. Because burr[start] doesn't pin Starlette (it arrives transitively via an unpinned fastapi), a fresh pip install "burr[start]" resolves to a current Starlette and the UI is broken out of the box.

Environment

  • burr 0.40.2 (via burr[start])
  • starlette 1.3.0, jinja2 3.1.6, fastapi 0.136.3
  • Reproduced on Python 3.13 and 3.14 (version-independent)

Root cause

burr/tracking/server/run.py:341 uses the pre-1.0 Starlette signature:

return templates.TemplateResponse("index.html", {"request": req})

Starlette 0.29 made request the first positional argument and 1.0 removed the old form, so "index.html" binds to request and the context dict binds to name; Jinja2 then tries to load a template whose name is a dict and raises TypeError: unhashable type: 'dict'. (Same break FastAPI hit in fastapi/fastapi#15198.)

Fix

return templates.TemplateResponse(request=req, name="index.html")

This is the only TemplateResponse call site in the package; with it the UI renders (HTTP 200) on Python 3.14 + Starlette 1.3.0. Verified locally. Worth pairing with a starlette>=0.29 floor, since the keyword form requires it.

Traceback

File ".../burr/tracking/server/run.py", line 341, in react_app
    return templates.TemplateResponse("index.html", {"request": req})
File ".../starlette/templating.py", line 148, in TemplateResponse
    template = self.get_template(name)
File ".../jinja2/environment.py", line 1016, in get_template
    return self._load_template(name, globals)
TypeError: unhashable type: 'dict'

Happy to send a PR if useful.

Lingua principale
Python
Stelle
2.6k
Fork
199
Merge medio
3g 10h
PR unite (30g)
6

Preparare l'ambiente

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 apache/burr

Tutte le issue di apache/burr

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.