ATH-MaaS/Pixelle-Video · error · HTTPException
str(e)
Error message
str(e)
What it means
GET /workflows/tts catches any exception raised while enumerating available TTS workflows and returns HTTP 500 with str(e). It means the workflow discovery/scan step failed — typically the workflow directory is missing or unreadable, or the video service dependency is unavailable — not that the request was malformed.
Source
Thrown at api/routers/resources.py:76
}
```
"""
try:
# Get all workflows from TTS service
all_workflows = pixelle_video.tts.list_workflows()
# Filter to TTS workflows only (filename starts with "tts_")
tts_workflows = [
WorkflowInfo(**wf)
for wf in all_workflows
if wf["name"].startswith("tts_")
]
return WorkflowListResponse(workflows=tts_workflows)
except Exception as e:
logger.error(f"List TTS workflows error: {e}")
raise HTTPException(status_code=500, detail=str(e))
@router.get("/workflows/media", response_model=WorkflowListResponse)
async def list_media_workflows(pixelle_video: PixelleVideoDep):
"""
List available media workflows (both image and video)
Returns list of all media workflows from both RunningHub and self-hosted sources.
Example response:
```json
{
"workflows": [
{
"name": "image_flux.json",
"display_name": "image_flux.json - Runninghub",
"source": "runninghub",
"path": "workflows/runninghub/image_flux.json",View on GitHub (pinned to 848b054e4f)
Solutions
- Check server logs for 'List TTS workflows error:' for the root cause
- Verify the workflows directory exists and contains TTS workflow files
- Ensure the media/video backend service the dependency requires is running
- Fix filesystem permissions on the workflows directory
- Server-side: sanitize detail instead of returning str(e)
Example fix
// before
except Exception as e:
logger.error(f"List TTS workflows error: {e}")
raise HTTPException(status_code=500, detail=str(e))
// after
except Exception:
logger.exception("List TTS workflows error")
raise HTTPException(status_code=500, detail="Unable to list TTS workflows") Defensive patterns
Strategy: fallback
Validate before calling
// check listing health before relying on it
const res = await fetch('/workflows/tts');
if (!res.ok) {
console.warn('TTS workflow listing unavailable, using cached list');
return cachedTtsWorkflows;
} Type guard
function isWorkflowList(r) { return Array.isArray(r?.workflows) && r.workflows.every(w => typeof w.id === 'string'); } Try / catch
try {
const res = await fetch('/workflows/tts');
if (!res.ok) throw new Error(`listing failed: ${res.status}`);
return (await res.json()).workflows;
} catch (err) {
return cachedWorkflowList ?? []; // serve stale list rather than failing the UI
} Prevention
- Cache the workflow list from a successful call and reuse it on failure
- For self-hosters: verify the workflows directory is present in your deployment
- Ensure the media backend service is started before the API
- Alert on 5xx from resource-listing endpoints — they indicate deployment issues, not client bugs
When it happens
Trigger: GET /workflows/tts when the underlying PixelleVideoDep service or workflow-directory scan throws (missing workflows dir, permission error, backend not initialized).
Common situations: Deployment missing the workflows directory or mounted at the wrong path; backend media service not started; file permissions broken after container image change.
Related errors
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/929c0a9baad49b86.
Report an issue: GitHub.