calesthio/OpenMontage · error · RuntimeError
Ark query returned no response
Error message
Ark query returned no response
What it means
RuntimeError raised after the _query_task retry loop finishes with response still None. In the loop, a retryable status (429 or 5xx) followed by 'continue' consumes attempts; the loop can only exit with response unset if every iteration hit the retryable-status continue path without ever reaching _raise_for_status or the break — practically, when retries are exhausted on retryable statuses or an iteration pattern leaves the loop via loop exhaustion. It means the task status query never obtained a usable HTTP response object.
Source
Thrown at tools/video/seedance_ark.py:1291
response = requests.get(
url,
headers=self._headers(api_key),
timeout=30,
)
retryable_status = (
response.status_code == 429 or response.status_code >= 500
)
if retryable_status and attempt < self.retry_policy.max_retries:
time.sleep(self.retry_policy.backoff_seconds * (2**attempt))
continue
self._raise_for_status(response)
break
except requests.RequestException:
if attempt >= self.retry_policy.max_retries:
raise
time.sleep(self.retry_policy.backoff_seconds * (2**attempt))
if response is None:
raise RuntimeError("Ark query returned no response")
data = response.json()
if not isinstance(data, dict):
raise RuntimeError("Ark query returned a non-object response")
return data
def _cancel_task(self, task_id: str, api_key: str) -> None:
import requests
response = requests.delete(
f"{self._get_base_url()}/contents/generations/tasks/{task_id}",
headers=self._headers(api_key),
timeout=30,
)
# The official DELETE success body is undefined and may be empty.
self._raise_for_status(response)
def _poll_task(
self,View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Back off and retry the whole operation after a pause — this usually indicates transient upstream load, not a bad request.
- Increase retry_policy.backoff_seconds and/or max_retries so exponential backoff outlasts the rate-limit window.
- Lengthen poll_interval_seconds to reduce query pressure when many tasks run concurrently.
- Check Ark/Volcengine status pages and your account quota if 429/5xx persists.
Example fix
# before retry = RetryPolicy(max_retries=1, backoff_seconds=1) # after retry = RetryPolicy(max_retries=5, backoff_seconds=5)
Defensive patterns
Strategy: retry
Try / catch
try:
result = tool.run(inputs)
except RuntimeError as e:
if "no response" in str(e):
time.sleep(60)
result = tool.run(inputs) # upstream was rate-limiting/degraded
else:
raise Prevention
- Use exponential backoff with enough retries to outlast 429 windows.
- Keep poll_interval_seconds >= 3 to avoid self-inflicted rate limits.
- Monitor Ark status and account quota before blaming the client.
When it happens
Trigger: Sustained 429 rate limiting or repeated 5xx responses from the Ark task-query endpoint across all retry attempts; combined with retry_policy.max_retries set such that each attempt falls into the 'retryable_status and attempt < max_retries' continue branch until the for-loop ends without break.
Common situations: Aggressive polling loops hammering the query endpoint, a degraded Ark region returning 502/503 for minutes, or API-key quota exhaustion manifesting as persistent 429s.
Related errors
- Polling prediction {prediction_id} failed after {consecutive
- Ark query returned a non-object response
- poll_interval_seconds must be between 0 and 60
- Ark returned unknown task status: {status or '<empty>'}
- Ark task {task_id} did not finish within {timeout}s
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/b54d87565fd3b9ad.
Report an issue: GitHub.