fix: broken subprocess command and tuple unpacking in app.py #19

Merged
llabeyrie merged 2 commits from fix/app-critical-bugs into main 2026-03-19 18:16:16 +00:00
Owner

Summary

  • Fix #1: Split the subprocess command list so each CLI flag is a separate element (was crammed into one string), and use sys.executable instead of hardcoded "python" for portability
  • Fix #2: Unpack all 3 return values from run_prompt_pipeline() — was unpacking only 2, causing ValueError at runtime

Both bugs made the Streamlit app completely non-functional.

Closes #1, closes #2

Test plan

  • python -c "import ast; ast.parse(open('app.py').read())" — no syntax errors
  • Run streamlit run app.py and verify card generation works end-to-end
## Summary - **Fix #1**: Split the subprocess command list so each CLI flag is a separate element (was crammed into one string), and use `sys.executable` instead of hardcoded `"python"` for portability - **Fix #2**: Unpack all 3 return values from `run_prompt_pipeline()` — was unpacking only 2, causing `ValueError` at runtime Both bugs made the Streamlit app completely non-functional. Closes #1, closes #2 ## Test plan - [x] `python -c "import ast; ast.parse(open('app.py').read())"` — no syntax errors - [x] Run `streamlit run app.py` and verify card generation works end-to-end
llabeyrie added 1 commit 2026-03-19 17:42:49 +00:00
Fix two critical bugs that made the Streamlit app completely non-functional:

1. Split subprocess command into properly separated list elements and use
   sys.executable instead of hardcoded "python" (#1)
2. Unpack all 3 return values from run_prompt_pipeline() (#2)

Closes #1, closes #2
llabeyrie added 1 commit 2026-03-19 18:12:39 +00:00
_extract_image_from_stdout() failed to find the generated image because
the pipeline prints "Card generated and saved to: generated_card.png"
but the function only tried the full line as a path. Now also tries the
part after the last colon.
llabeyrie merged commit 9b6fd1d95a into main 2026-03-19 18:16:16 +00:00
llabeyrie deleted branch fix/app-critical-bugs 2026-03-19 18:16:19 +00:00
Sign in to join this conversation.