I'm trying to make an exe file with PyInstaller however I'm unable to do so. The file is built and deposited in the dist folder, however when I try to run it, the the error "Failed to execute script {name}" pops up.
Here is the .spec file that I'm using:
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['simulator.pyw'],
             pathex=['C:\\Simulator'],
             binaries=[],
             datas=[('bin/**/*.kv', './bin/ui'), ('bin/**/*.xml', './bin/ui')],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=True,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          [],
          exclude_binaries=True,
          name='simulator',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          console=False , icon='bin\\ui\\icon.ico')
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               upx_exclude=[],
               name='simulator')
and this is the output from the console:
What could be the problem?
 
     
    