Skip to content

Commit 6a5a703

Browse files
committed
Tests fix
1 parent bc61af0 commit 6a5a703

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

interpreter/core/computer/display/display.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
cv2 = None # Fixes colab error
2727

2828
pyautogui = lazy_import("pyautogui")
29+
30+
# Check if there's a display available
31+
try:
32+
# Attempt to get the screen size
33+
pyautogui.size()
34+
except:
35+
pyautogui = None
36+
2937
np = lazy_import("numpy")
3038
plt = lazy_import("matplotlib.pyplot")
3139
screeninfo = lazy_import("screeninfo")

0 commit comments

Comments
 (0)