burtherman opened a new issue, #809:
URL: https://github.com/apache/burr/issues/809
## 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:
```python
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
```python
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]