Fix image detection after print-to-logging migration #22

Merged
llabeyrie merged 1 commits from fix/app-image-detection into main 2026-03-19 19:15:45 +00:00
Owner

Summary

  • app.py relied on parsing stdout for "Card generated and saved to: generated_card.png" to find the generated image
  • PR #21 replaced that print() with logger.info(), so stdout no longer contains the path
  • This caused _extract_image_from_stdout() to return None, triggering the "Aucune image générée détectée" error
  • Fix: check the known --save-path file directly (APP_DIR / save_path) instead of parsing stdout; fall back to stdout parsing only if the file isn't found

Test plan

  • Syntax check passes
  • Run streamlit run app.py and generate a card — image should now display correctly
## Summary - `app.py` relied on parsing stdout for `"Card generated and saved to: generated_card.png"` to find the generated image - PR #21 replaced that `print()` with `logger.info()`, so stdout no longer contains the path - This caused `_extract_image_from_stdout()` to return `None`, triggering the "Aucune image générée détectée" error - Fix: check the known `--save-path` file directly (`APP_DIR / save_path`) instead of parsing stdout; fall back to stdout parsing only if the file isn't found ## Test plan - [x] Syntax check passes - [x] Run `streamlit run app.py` and generate a card — image should now display correctly
llabeyrie added 1 commit 2026-03-19 19:14:30 +00:00
app.py relied on parsing stdout for the save path printed by the
pipeline. After PR #21 replaced that print with logger.info(), the
stdout parsing returned None, causing "Aucune image générée détectée".

Now check the known save path directly (APP_DIR / save_path) and
only fall back to stdout parsing if the file isn't found.
llabeyrie merged commit dbf4946875 into main 2026-03-19 19:15:45 +00:00
llabeyrie deleted branch fix/app-image-detection 2026-03-19 19:15:45 +00:00
Sign in to join this conversation.