Tracking UI returns HTTP 500 on all pages with Starlette ≥1.0 (TemplateResponse signature)
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 react_app 入口处的 burr/tracking/server/run.py,并检查第 341 行附近的 TemplateResponse 调用。使用 Starlette 1.0 或更高版本复现 tracking UI 故障,然后验证提供的 index.html 返回 HTTP 200;如果添加建议的 Starlette 最低版本,还要检查 burr[start] 的依赖配置。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 2.6k
- 派生
- 209
- 平均合并
- 8 天 9 小时
- 30 天内合并 PR
- 26
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/burr 的其他 Issue
-
Notebook UI launcher should use the current Python interpreter可能已有人在做 @sivakumar-mahalingam 于 5 天前认领。 未关闭status/needs-triage
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 4 天内回复
-
astep() passes unprocessed inputs to pre_run_step hooks可能已有人在做 @sivakumar-mahalingam 于 5 天前认领。 未关闭status/needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 4 天内回复
-
`burr` fails to start when the Python path has a space in it可能已有人在做 @enekoreto 于 8 天前认领。 未关闭status/needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
-
Add more instructions for applying ORM migrations for S3 deployment可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area/storage area/ui help wanted kind/documentation priority/low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 4 天内回复
-
Add documentation on how to run the Burr UI server可能重新可做 @iamSerafinnn 于 137 天前认领,目前没有进行中的 PR。 未关闭area/ui good first issue kind/documentation priority/low
难度 2/5 半天 新手友好度 68/100
维护者通常 4 天内回复
相似的 Issue
-
[Resource]: Lore未关闭resource-submission validation-passed
难度 1/5 1 小时以内 新手友好度 88/100
hesreallyhim/awesome-claude-code#3234 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
openminion/openminion#376 ·
维护者通常 1 天内回复
-
Type: ☹︎ Bug
难度 2/5 1-3 小时 新手友好度 78/100
posit-dev/great-tables#1028 ·
维护者通常 1 天内回复
-
integration: apple_tv
难度 2/5 1-3 小时 新手友好度 78/100
home-assistant/core#188282 · 1 条评论 ·
维护者通常 1 天内回复
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"未关闭P4: low
难度 2/5 1-3 小时 新手友好度 65/100
jeffknupp/association#538 ·