2

i know i should share the code instead of image but please refer image for my path. This is my path of project

setup file contains

from Functions.MainWindow import Ui
def OpenMainwindow(self):
    try:
        app = QtWidgets.QApplication(sys.argv)
        window = Ui()
        window.show()
        app.exec_()
        # Ui()
    except Exception as es:
        print(es)

And the Inside form file i loaded UI file from other folder

uic.loadUi(r"./BAJARANGBALI/Forms/MainWindow.ui", self)

but when i make exe using auto-py-to-exe during running of exe file it shows file not found.[Errno 2] No such file or directory: './Forms/MainWindow.ui'.

I tried every path ,Even tried by moving exe to that path but no result.

I am new to stackoverflow i hope i tried my best to describe my issue.Thanks

Bijaya Kumar
  • 37
  • 1
  • 9
  • your file path is JAY BAJRANG/BAJRANGBALI in B DRIVE but here you gave path ./BAJRANGBALI you should give full path then it will work. ./ use for same working directory where you project is. but if you have file outside then give full path like "B:\Jay Bajrangbali then folder name and then file location. If you dont know how to give path then just click on top Address bar and select copy and paste in python – Ehsan Rahi Oct 02 '21 at 18:22
  • 1
    No the exe i am going to make should be portable.Thats the problem. – Bijaya Kumar Oct 03 '21 at 07:35

0 Answers0