Skip to content

Commit

Permalink
Fixed the file path to work on windows and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Champagne authored and Mehmet Çağrı Aksoy committed Oct 23, 2023
1 parent 72f43a0 commit 28ebfa2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ui_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# IMPORTS
import sys
import glob
import os

try:
import serial
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 28ebfa2

Please sign in to comment.