Tuple unpacking mismatch in app.py line 119 #2

Closed
opened 2026-03-19 17:29:52 +00:00 by llabeyrie · 0 comments
Owner

Description

run_prompt_pipeline() returns a 3-tuple (image_path, full_output, cmd) (line 56), but the call site on line 119 only unpacks 2 values:

# Line 56 — returns 3 values:
return image_path, full_output.strip(), cmd

# Line 119 — unpacks only 2:
image, logs = run_prompt_pipeline(raw_text)

This will raise a ValueError: too many values to unpack at runtime and crash the app every time the generate button is clicked.

Fix

image, logs, _cmd = run_prompt_pipeline(raw_text)

Or change the function to return only 2 values if cmd is not needed externally.

## Description `run_prompt_pipeline()` returns a 3-tuple `(image_path, full_output, cmd)` (line 56), but the call site on line 119 only unpacks 2 values: ```python # Line 56 — returns 3 values: return image_path, full_output.strip(), cmd # Line 119 — unpacks only 2: image, logs = run_prompt_pipeline(raw_text) ``` This will raise a `ValueError: too many values to unpack` at runtime and **crash the app** every time the generate button is clicked. ### Fix ```python image, logs, _cmd = run_prompt_pipeline(raw_text) ``` Or change the function to return only 2 values if `cmd` is not needed externally.
llabeyrie added the bugpriority: critical labels 2026-03-19 17:31:38 +00:00
Sign in to join this conversation.