odysseus-dev/odysseus · error · HTTPException
No image files found on disk
Error message
No image files found on disk
What it means
Error "No image files found on disk" thrown in odysseus-dev/odysseus.
Source
Thrown at routes/gallery/gallery_routes.py:1034
buf = io.BytesIO()
used = set()
with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf:
for img in imgs:
src = _gallery_image_path(img.filename)
if not src.exists():
continue
ext = src.suffix or ".png"
base = (img.prompt or "").strip() or src.stem
base = re.sub(r"[^\w\-. ]+", "", base)[:60].strip() or img.id
name = f"{base}{ext}"
i = 1
while name in used:
name = f"{base}-{i}{ext}"
i += 1
used.add(name)
zf.write(src, arcname=name)
if not used:
raise HTTPException(404, "No image files found on disk")
from fastapi import Response
return Response(
content=buf.getvalue(),
media_type="application/zip",
headers={"Content-Disposition": 'attachment; filename="gallery-photos.zip"'},
)
finally:
db.close()
# ---- POST /api/gallery/clear-user-tags ----
# Wipe the `tags` field on every image owned by the current user.
# Leaves `ai_tags` intact. Use after a bug populated user-tags with
# AI-suggested values you never added.
@router.post("/api/gallery/clear-user-tags")
async def clear_gallery_user_tags(request: Request) -> Dict[str, Any]:
user = get_current_user(request)
db = SessionLocal()
try:View on GitHub (pinned to f9235ebbf1)
Solutions
- Restore the missing image files from backup or re-upload them.
- Check the gallery storage directory path and permissions.
When it happens
Trigger: Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.
Common situations: See trigger scenarios.
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/cb4f8ed4bd19a292.
Report an issue: GitHub.