From 2ec122ab59231cd45f3b25afa23921feb1427dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Nar=C4=99bski?= Date: Sat, 6 Sep 2025 13:45:00 +0200 Subject: [PATCH] Improve the "Python environment not configured." error message The error message now explains which packages should be installed in the selected Python environment for it to pass the test. This commit addresses issue #13. --- src/main/java/actions/StartStopTrackingAction.java | 8 +++++++- src/main/java/components/ConfigDialog.java | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/actions/StartStopTrackingAction.java b/src/main/java/actions/StartStopTrackingAction.java index 1a4c1fd..13db6a9 100644 --- a/src/main/java/actions/StartStopTrackingAction.java +++ b/src/main/java/actions/StartStopTrackingAction.java @@ -73,7 +73,13 @@ public void actionPerformed(@NotNull AnActionEvent e) { if (!isTracking) { if (config.getCheckBoxes().get(1)) { if (!AvailabilityChecker.checkPythonEnvironment(config.getPythonInterpreter())) { - JOptionPane.showMessageDialog(null, "Python interpreter not found. Please configure the plugin first."); + JOptionPane.showMessageDialog( + null, + "Python interpreter not found, "+ + "or Python environment lacks required packages: "+ + "tobii_research, screeninfo, pyautogui.\n"+ + "Please configure the plugin first, and set up the Python environment." + ); return; } if (config.getEyeTrackerDevice() != 0 && !AvailabilityChecker.checkEyeTracker(config.getPythonInterpreter())) { diff --git a/src/main/java/components/ConfigDialog.java b/src/main/java/components/ConfigDialog.java index 268c445..6b49b09 100644 --- a/src/main/java/components/ConfigDialog.java +++ b/src/main/java/components/ConfigDialog.java @@ -353,7 +353,11 @@ protected void textChanged(@NotNull DocumentEvent e) { eyeTracking.addActionListener(actionEvent -> { if (!pythonEnvironment) { eyeTracking.setSelected(false); - new AlertDialog("Python environment not configured.", AllIcons.General.BalloonWarning).show(); + new AlertDialog( + "Python environment not configured, or not set up properly.\n"+ + "Required packages to be installed are: tobii_research, screeninfo, pyautogui.", + AllIcons.General.BalloonWarning + ).show(); return; } if (!eyeTracking.isSelected()) {