BUG: Corrupted image metadata causes HTTP 500, crashing the entire gallery view
Maintainer thường phản hồi trong vòng 10 ngày
@mystic-fae đang làm issue này rồi.
Từ ngày 19/11/2026.
Đá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
- 45/100
Hướng nghiên cứu
Read backend/AGENTS.md and compare the image handling in backend/app/routes/images.py (get_all_images() and search_images_by_tag()) with the validation handling in videos.py and video_util_to_video_data. Confirm how warnings are logged and how image records are validated. Done means a malformed record is logged and skipped while valid images still return successfully from both endpoints.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is there an existing issue for this?
- I have searched the existing issues
What happened?
I noticed that in backend/app/routes/images.py (get_all_images() and search_images_by_tag()), the app builds the list of images using a direct list comprehension.
If even one photo in the database has corrupted or unexpected metadata, Pydantic throws a ValidationError. Because it's trapped in a bare list comprehension, that single bad record crashes the entire endpoint with an HTTP 500. As a result, the user's whole gallery fails to load.
Why we should fix it
The project's own rulebook in backend/AGENTS.md is super clear about this.
videos.py already handles this gracefully, but images.py is missing the pattern.
The proposed fix
We can update the loop in images.py to go row by row using a try/except block (just like video_util_to_video_data). If a row fails validation, we can log a warning with the image ID, skip it, and let the rest of the healthy photos load successfully with a 200 response instead of crashing.
I want to work on this issue and open a PR about this .
Can assign this to me?
Record
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Python
- Star
- 320
- Fork
- 771
- Merge trung bình
- 9 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AOSSIE-Org/PictoPy
-
BUG: Add images to album: success message shows requested count, not number actually addedCó thể đã có người làm @avika269 đã nhận 3 ngày trước. Đang mởbug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AOSSIE-Org/PictoPy#1740 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
-
BUG: /sync-folder does not validate the supplied folder_idCó thể đã có người làm @sathvikn113 đã nhận 4 ngày trước. Đang mởbug possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AOSSIE-Org/PictoPy#1731 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
-
DOC: update deprecated libgl1-mesa-glx package and stale setup.md referencesCó thể đã có người làm @avika269 đã nhận 4 ngày trước. Đang mởdocumentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
AOSSIE-Org/PictoPy#1730 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
-
BUG: onSuccess in useMutationFeedback triggers repeated executions / infinite re-render loopĐang mởbug possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AOSSIE-Org/PictoPy#1729 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
-
BUG: Memory curator misses upcoming anniversaries across year boundaries and on leap daysCó thể đã có người làm @akhilmodi29 đã nhận 5 ngày trước. Đang mởbug possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
AOSSIE-Org/PictoPy#1725 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
Tất cả issue của AOSSIE-Org/PictoPy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-format
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#6475 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
skills: _skill_body cuts the frontmatter short when a description contains ---Có thể đã có người làm @nurlanmnn đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zilliztech/memsearch#876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
acl-org/acl-anthology#11025 ·
Maintainer thường phản hồi trong vòng 1 ngày