fix(ci): suppress OpenCV NULL guiReceiver error in headless environment#290
Open
MD-Mushfiqur123 wants to merge 1 commit into
Open
fix(ci): suppress OpenCV NULL guiReceiver error in headless environment#290MD-Mushfiqur123 wants to merge 1 commit into
MD-Mushfiqur123 wants to merge 1 commit into
Conversation
Review Summary by QodoHandle missing display in headless CI environments gracefully
WalkthroughsDescription• Wrap monitor detection in try-except to handle headless environments • Add fallback monitor with default 1920x1080 resolution • Prevents OpenCV NULL guiReceiver error in CI/headless servers Diagramflowchart LR
A["get_monitors()[0]"] -->|"try"| B["monitor_window assigned"]
A -->|"exception"| C["_MonitorFallback"]
C -->|"1920x1080 default"| B
File Changes1. src/utils/interaction.py
|
Code Review by Qodo
Context used 1. Silent monitor fallback
|
Udayraj123
reviewed
May 29, 2026
Owner
Udayraj123
left a comment
There was a problem hiding this comment.
LGTM. Will be handling this in v2 in a better way. @MD-Mushfiqur123 can you please cover this change in a test case?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #230
Wrap
get_monitors()[0]in a try-except block so that the application does not crash in headless/CI environments where no display is available. Falls back to a default 1920x1080 monitor when screeninfo cannot detect any monitors.This resolves the
NULL guiReceivererror from OpenCV when running pre-commit hooks or tests on a headless server.