Skip to content

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

Description

@burtherman

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions