title: Error loading PyQt5 UI file
body: <p>I am using following code to load a ui file, but keep seeing an error message.</p>
  
  <hr>
  
  <pre><code># main.py
  import sys
  from PyQt5.QtWidgets import *
  from PyQt5 import uic
  
  form_class = uic.loadUiType("main_window.ui")[0]
  
  class MyWindow(QMainWindow, form_class):
      def __init__(self):
          super().__init__()
          self.setupUi(self)
  
  if __name__ == "__main__":
      app = QApplication(sys.argv)
      myWindow = MyWindow()
      myWindow.show()
      app.exec_()
  </code></pre>
  
  <hr>
  
  <pre><code>Error message:
      FileNotFoundError: [Errno 2] No such file or directory: 'main_window.ui'
  </code></pre>
  
  <p><code>main_window.ui</code> is located in the same folder as <code>main.py</code></p>