calesthio/OpenMontage · error · ComfyUIError
No prompt_id in response: {data}
Error message
No prompt_id in response: {data} What it means
ComfyUIError raised when the /prompt response parsed successfully and contained no node_errors or error, yet lacks a prompt_id field. prompt_id is the only handle the client has for polling history and websockets, so without it the call cannot proceed. It usually indicates the server responded with something unexpected — an HTML error page that happened to parse, a proxy interposing, or an empty JSON object.
Source
Thrown at tools/_comfyui/client.py:196
def submit(self, workflow: dict) -> str:
"""Queue a workflow for execution. Returns the ``prompt_id``."""
resp = requests.post(
f"{self.server_url}/prompt",
json={"prompt": workflow, "client_id": self.client_id},
timeout=30,
)
try:
data = resp.json()
except ValueError:
data = {}
if data.get("node_errors"):
raise ComfyUIError(f"Node errors: {json.dumps(data['node_errors'])}")
if data.get("error"):
raise ComfyUIError(f"Prompt error: {json.dumps(data['error'])}")
resp.raise_for_status()
prompt_id = data.get("prompt_id")
if not prompt_id:
raise ComfyUIError(f"No prompt_id in response: {data}")
return prompt_id
def poll(
self,
prompt_id: str,
*,
timeout: int = 600,
interval: int = 5,
) -> dict:
"""Block until *prompt_id* finishes. Returns the history entry."""
deadline = time.time() + timeout
while time.time() < deadline:
entry = self._history_entry(prompt_id)
if entry is not None:
return entry
time.sleep(interval)
raise ComfyUIError(
f"Prompt {prompt_id} did not complete within {timeout}s. "View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Print the embedded data payload — it shows exactly what the server returned
- Curl the server directly (GET {server_url}/system_stats) to confirm a real ComfyUI is listening at that URL
- Remove/verify any proxy in front of ComfyUI or whitelist the client in ComfyUI's security config
- Restart ComfyUI and wait for its startup log line before submitting
Example fix
# before
client = ComfyUIClient("http://localhost:8188") # wrong port/service
# after
import requests
assert requests.get("http://localhost:8188/system_stats", timeout=5).ok
client = ComfyUIClient("http://localhost:8188") Defensive patterns
Strategy: validation
Validate before calling
import requests
stats = requests.get(f"{server_url}/system_stats", timeout=5)
stats.raise_for_status() # real ComfyUI responds here
assert "comfyui" in stats.json().get("system", {}).get("comfyui_version", "") or stats.ok Type guard
def comfyui_is_alive(server_url: str) -> bool:
try:
return requests.get(f"{server_url}/system_stats", timeout=5).ok
except requests.RequestException:
return False Try / catch
try:
prompt_id = client.submit(workflow)
except ComfyUIError as e:
if "No prompt_id" in str(e):
raise SystemExit(f"server at {client.server_url} is not a healthy ComfyUI — check URL/proxy/startup")
raise Prevention
- Health-check GET /system_stats before the first submit
- Wait for ComfyUI's startup-complete log before driving it
- Ensure no auth layer or proxy rewrites /prompt responses
When it happens
Trigger: submit() gets a 200 response whose body is {} or an unexpected shape; a reverse proxy returns a JSON body without prompt_id; ComfyUI is behind auth that returned a JSON-formatted denial; a very old/new ComfyUI build with a changed response contract.
Common situations: Wrong server_url pointing at a non-ComfyUI service; ComfyUI not fully started when the first submit lands; a port conflict serving a different tool; version mismatch between client expectations and server build.
Related errors
- Node errors: {json.dumps(data['node_errors'])}
- Prompt error: {json.dumps(data['error'])}
- Prompt {prompt_id} did not complete within {timeout}s. The j
- Execution error: {msgs}
- Execution error: {data}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/ca3c4c38e5619ee5.
Report an issue: GitHub.