diff --git a/src/ui_main.py b/src/ui_main.py index 92197c9..65dcc71 100644 --- a/src/ui_main.py +++ b/src/ui_main.py @@ -4,6 +4,7 @@ # IMPORTS import sys import glob +import os try: import serial @@ -78,7 +79,13 @@ def __init__(self): """ Initialize Main Window """ QMainWindow.__init__(self) - loadUi('..\\ui\\main_window.ui', self) + file_path = os.path.join("../ui/main_window.ui") + + if not os.path.exists(file_path): + print("UI File Not Found!") + sys.exit(1) + + loadUi(file_path, self) PORTS = get_serial_port()