windmill-labs/windmill · error · Exception
result is None for {job_id = }
Error message
result is None for {job_id = } What it means
get_result() fetches a completed job's result; if assert_result_is_not_none=True and the raw response text is None it raises this error. Note the check is on result.text being None, which is rare — an empty body usually yields '' not None — so this mainly fires when the HTTP layer returns a null body object.
Source
Thrown at python-client/wmill/wmill/client.py:576
def get_result(
self,
job_id: str,
assert_result_is_not_none: bool = True,
) -> Any:
"""Get the result of a completed job.
Args:
job_id: UUID of the completed job
assert_result_is_not_none: Raise exception if result is None
Returns:
Job result
"""
result = self.get(f"/w/{self.workspace}/jobs_u/completed/get_result/{job_id}")
result_text = result.text
if assert_result_is_not_none and result_text is None:
raise Exception(f"result is None for {job_id = }")
try:
return result.json()
except JSONDecodeError:
return result_text
def get_variable(self, path: str) -> str:
"""Get a variable value by path.
Args:
path: Variable path in Windmill
Returns:
Variable value as string
"""
path = parse_variable_syntax(path) or path
if self.mocked_api is not None:
variables = self.mocked_api["variables"]
try:View on GitHub (pinned to e474e8803c)
Solutions
- Have the script return an explicit value (e.g. `return {...}`).
- Set assert_result_is_not_none=False when a None result is valid.
- Check the job's result on the runs page to confirm what was stored.
Example fix
// before
res = client.get_result(job_id, assert_result_is_not_none=True)
// after
res = client.get_result(job_id, assert_result_is_not_none=False)
if res is None:
res = {} Defensive patterns
Strategy: validation
Validate before calling
completed = client.get_job(job_id)
if completed.get('result') is None and assert_non_none:
raise ValueError(f'job {job_id} has no result; do not assert') Type guard
def result_present(res) -> bool:
return res is not None and res != '' Try / catch
try:
res = client.get_result(job_id, assert_result_is_not_none=True)
except Exception as e:
if 'result is None' in str(e):
res = None
else:
raise Prevention
- Ensure scripts return explicit values before querying their results.
- Only enable assert_result_is_not_none when the script contract guarantees output.
- Check the run's result in the UI to confirm stored output shape.
When it happens
Trigger: Calling get_result(job_id, assert_result_is_not_none=True) on a job whose completed result payload is empty/None (e.g. script returned nothing).
Common situations: Side-effect-only scripts that return no value; querying results before the job produced output; asserting non-None on jobs known to return null.
Related errors
- Result was none
- Job {job_id} was not successful: {str(error)}
- path or hash_ must be provided
- reached timeout
- could not read the run of job ${id}: ${res.status} ${await r
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/15154a7162281d57.
Report an issue: GitHub.