Skip to content

Commit 2c8b531

Browse files
committed
Fixed wrong Entry error & Added messageBox
1 parent 4de6752 commit 2c8b531

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

YoloGUI.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tkinter as tk
2-
from tkinter import filedialog
2+
from tkinter import filedialog, messagebox
33
from Yolo import Yolo
44

55

@@ -86,8 +86,11 @@ def set_path(self):
8686
self.yolo_path_box.insert(0, self.yolo_var)
8787

8888
def start(self):
89-
y = Yolo(self.image_var, self.yolo_var, float(self.confidence_var.get()), float(self.threshold_var.get()))
90-
y.start_process()
89+
try:
90+
y = Yolo(self.image_var, self.yolo_var, float(self.confidence_var.get()), float(self.threshold_var.get()))
91+
y.start_process()
92+
except:
93+
messagebox.showerror("Error", "Please Enter a Valid Path")
9194

9295

9396
if __name__ == '__main__':

0 commit comments

Comments
 (0)