Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#809 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
fastapi, python
Lĩnh vực
backend

Hướng nghiên cứu

Đọc burr/tracking/server/run.py tại điểm vào react_app và kiểm tra lệnh gọi TemplateResponse quanh dòng 341. Tái hiện lỗi của tracking UI với Starlette 1.0 hoặc mới hơn, sau đó xác minh rằng index.html được cung cấp trả về HTTP 200; đồng thời kiểm tra cấu hình dependency của burr[start] nếu thêm phiên bản Starlette tối thiểu được đề xuất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
2.6k
Fork
203
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/burr

Tất cả issue của apache/burr

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.