calesthio/OpenMontage · error · RuntimeError
TokenHub task {task_id} completed but no data[].url: {data}
Error message
TokenHub task {task_id} completed but no data[].url: {data} What it means
RuntimeError raised when a TokenHub task reports status 'completed' but its data array contains no objects with a 'url' field. The poller expects at least one downloadable URL in data[].url; a completed task with an empty data array or items lacking urls is treated as a contract violation.
Source
Thrown at tools/graphics/hunyuan_image.py:503
while time.time() < deadline:
time.sleep(poll_interval)
resp = requests.post(
url,
json={"model": model, "id": task_id},
headers=self._auth_headers(api_key),
timeout=30,
)
data = self._json_or_raise(resp)
self._check_response(data)
status = data.get("status", "")
if status == "completed":
result_data = data.get("data") or []
urls = [item.get("url") for item in result_data if item.get("url")]
if not urls:
raise RuntimeError(
f"TokenHub task {task_id} completed but no data[].url: {data}"
)
return urls
if status == "failed":
error_info = data.get("error") or {}
error_msg = error_info.get("message", "unknown error")
raise RuntimeError(
f"TokenHub task {task_id} failed: {error_msg}"
)
# queued / running / in_progress — continue polling
if status not in ("queued", "running", "in_progress"):
raise RuntimeError(
f"TokenHub task {task_id} returned unknown status: {status}"
)
raise TimeoutError(View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Log the full task payload (included in the exception message) to see what data[] actually contains
- Adjust the prompt to avoid potentially filtered subject matter and retry
- If data[] items use a different URL key, extend the urls extraction in _poll_task to include it
- Fall back to base64-decoding if the API returns inline image data instead of URLs
Defensive patterns
Strategy: try-catch
Try / catch
try:
urls = client._poll_task(task_id, ...)
except RuntimeError as e:
if "no data[].url" in str(e):
# completed without output; usually content filtering or schema drift
raise Prevention
- Avoid prompts likely to be output-filtered
- Keep a response logger in dev to detect renamed URL keys
- Retain task payloads for support escalation
When it happens
Trigger: Upstream generation completed but produced zero images (e.g. content filtered at the output stage); API version returning URLs under a different key (e.g. image_url, b64) instead of url; partially-truncated response body.
Common situations: Content-policy soft-filters that mark tasks completed without output; schema drift in the TokenHub response; rare server-side storage failures where the generated asset is not uploaded.
Related errors
- TokenHub task {task_id} returned unknown status: {status}
- TokenHub submit returned no task id: {data}
- TokenHub task {task_id} failed: {error_msg}
- TokenHub task {task_id} did not finish within {timeout_secon
- Non-JSON response from TokenHub API: HTTP {response.status_c
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/4bdfeba0c85ac004.
Report an issue: GitHub.