title: Python pyinstaller - Error AttributeError: 'App' object has no attribute 'cursor'
body: <p>I finished my personal project in Python and i'm trying to create an .EXE, <em>everything is working perfectly inside Visual Studio</em>, but when I try to run the .exe inside the folder &quot;dist&quot; i get the following messagebox warning</p>
  <pre><code>Unhandled exception in script
  
  Failed to execute script 'sistema' due to unhandled exception: 'App' object has no attribute 'Cursor'
  </code></pre>
  <p>How to solve this? What causes it?</p>
  <p>Below is my code to connect db:</p>
  <pre><code>def connect(self):
          os.chdir(&quot;C:&quot;)
          os.chdir(&quot;C:\\instantclient_21_3&quot;)
          try: 
              self.conexao = cx_Oracle.connect(&quot;~~ my string connection~~&quot;)
              self.cursor = self.conexao.cursor()
              
          except cx_Oracle.DatabaseError: 
              pass
  </code></pre>
  <p>note: everything is working perfectly when I run through VS Code</p>
  <p>note2: i used the command pyinstaller --onefile --w sistema.py</p>