Guard Pillow-dependent features - #246
Conversation
There was a problem hiding this comment.
💡 Codex Review
Lines 578 to 582 in c3c686a
[P1] Skip preview update when Pillow is unavailable
LabelEditorWidget._perform_preview_update calls render_template(...) unconditionally. When Pillow is not installed, the new guards in render.preview raise RuntimeError, so the editor still crashes during initialisation even though the UI disables preview controls when ImageQt is missing. Short-circuit this method or catch the exception when Pillow cannot be imported so the application can keep running without preview support.
Labels-App/editor/items/base.py
Lines 114 to 118 in c3c686a
[P1] Guard element pixmap updates when Pillow is missing
GraphicsElementItem._update_pixmap calls render_element_image(...) before checking whether Pillow is available. Because the renderer now raises a RuntimeError when Pillow is absent, loading any document still blows up instead of falling back to the placeholder UI. The method should skip or handle pixmap generation when ImageQt (and therefore Pillow) is unavailable.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68dbe9cc3a30832c954f15d561ceee71