*Latest Update:* I found my issue in the file looking in my local folder for files, it now looks in the correct location, the file path is
'/Volumes/Mac 2TB/Work/Projects/DartDev/dist/DartVader/' which is correct, I now have the 2 folder and their contents in the correct place in the dist folder. *My spec file appears to be correct I even get the ICON on the app file:* # -*- mode: python ; coding: utf-8 -*- from PyInstaller.utils.hooks import collect_all datas = [('/Volumes/Mac 2TB/Work/Projects/DartDev/UI', ' UI'), ('/Volumes/Mac 2TB/Work/Projects/DartDev/playerfile.txt', '.'), ('/Volumes/Mac 2TB/Work/Projects/DartDev/DartImages', ' DartImages')] binaries = [] hiddenimports = [] tmp_ret = collect_all('screeninfo') datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2] block_cipher = None a = Analysis( ['maingame.py'], pathex=['/Volumes/Mac 2TB/Work/Projects/DartDev'], binaries=binaries, datas=datas, hiddenimports=hiddenimports, hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False, ) pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE( pyz, a.scripts, [], exclude_binaries=True, name='DartVader', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, console=False, disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, icon=['/Volumes/Mac 2TB/Work/Projects/DartDev/dart.icns'], ) coll = COLLECT( exe, a.binaries, a.zipfiles, a.datas, strip=False, upx=True, upx_exclude=[], name='DartVader', ) app = BUNDLE( coll, name='DartVader.app', icon='/Volumes/Mac 2TB/Work/Projects/DartDev/dart.icns', bundle_identifier=None, ) *However I now get the following error:* WADiverDave@192 ~ % /Volumes/Mac\ 2TB/Work/Projects/DartDev/dist/DartVader/DartVader ; exit; /Volumes/Mac 2TB/Work/Projects/DartDev/dist/DartVader /Volumes/Mac 2TB/Work/Projects/DartDev/dist/DartVader Traceback (most recent call last): File "maingame.py", line 168, in <module> File "maingame.py", line 153, in main File "maingame.py", line 72, in __init__ File "maingame.py", line 102, in setUpUI File "PyQt5/uic/__init__.py", line 238, in loadUi File "PyQt5/uic/Loader/loader.py", line 66, in loadUi File "PyQt5/uic/uiparser.py", line 1020, in parse File "xml/etree/ElementTree.py", line 1229, in parse File "xml/etree/ElementTree.py", line 569, in parse FileNotFoundError: [Errno 2] No such file or directory: '/Volumes/Mac 2TB/Work/Projects/DartDev/dist/DartVader/UI/splashScreen.ui' [86356] Failed to execute script 'maingame' due to unhandled exception: [Errno 2] No such file or directory: '/Volumes/Mac 2TB/Work/Projects/DartDev/dist/DartVader/UI/splashScreen.ui' [86356] Traceback: Traceback (most recent call last): File "maingame.py", line 168, in <module> File "maingame.py", line 153, in main File "maingame.py", line 72, in __init__ File "maingame.py", line 102, in setUpUI File "PyQt5/uic/__init__.py", line 238, in loadUi File "PyQt5/uic/Loader/loader.py", line 66, in loadUi File "PyQt5/uic/uiparser.py", line 1020, in parse File "xml/etree/ElementTree.py", line 1229, in parse File "xml/etree/ElementTree.py", line 569, in parse FileNotFoundError: [Errno 2] No such file or directory: '/Volumes/Mac 2TB/Work/Projects/DartDev/dist/DartVader/UI/splashScreen.ui' My dist folder has the DartsVader folder and inside a UI folder and inside that there is the splashScreen.ui file - I just dont understand why it will now move forward. Thanks for any assistance. On Sunday, 15 January 2023 at 19:41:10 UTC+8 David Greenland wrote: > Hi. > > I have included the .spec file and a copy of the error log when running > from the terminal. I have set the path to where the app is and it still > wants my included data files to be in my USER Folder and not use the files > it has inside the resource folder. if I add the missing files & folders to > my USER Folder the app works in terminal mode but not in the .app file > > I have tried may different way to resolve this problem but I am stumped. > I resolve the relative path with the resourcePath function below and it > always get the correct detail. > > def resourcePath(relativePath): > try: > basePath = sys.MEIPASS > except Exception: > basePath = os.path.abspath('.') > return os.path.join(basePath, relativePath) > > SPEC FILE: > # -*- mode: python ; coding: utf-8 -*- > from PyInstaller.utils.hooks import collect_all > > datas = [('/Volumes/Mac 2TB/Work/Projects/DartDev/DartImages', > './DartImages'), ('/Volumes/Mac > 2TB/Work/Projects/DartDev/UI/getplayersV2.ui', 'UI'), ('/Volumes/Mac > 2TB/Work/Projects/DartDev/UI/halvemRandomSinglesV1.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/halvemRandomSinglesV2.ui', > 'UI'), ('/Volumes/Mac > 2TB/Work/Projects/DartDev/UI/halvemRandomDoublesV1.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/halvemRandomDoublesV2.ui', > 'UI'), ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/mainWindow.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreBoard.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreBoardCricketV2.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreBoardx01.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreCricketv1.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreCricketv2.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreSheetDoublesV1.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreSheetDoublesV2.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreSheetSinglesV1.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreSheetSinglesV2.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreSheetTreblesV1.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreSheetTreblesV2.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/scoreX01v2.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/UI/splashScreen.ui', 'UI'), > ('/Volumes/Mac 2TB/Work/Projects/DartDev/playerfile.txt', '.')] > binaries = [('/Volumes/Mac > 2TB/Work/Projects/DartDev/DartImages/darts2.png', '.')] > hiddenimports = [] > tmp_ret = collect_all('screeninfo') > datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2] > > > block_cipher = None > > > a = Analysis( > ['maingame.py'], > pathex=['/Volumes/Mac 2TB/Work/Projects/DartDev'], > binaries=binaries, > datas=datas, > hiddenimports=hiddenimports, > hookspath=[], > hooksconfig={}, > runtime_hooks=[], > excludes=[], > win_no_prefer_redirects=False, > win_private_assemblies=False, > cipher=block_cipher, > noarchive=False, > ) > pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) > > exe = EXE( > pyz, > a.scripts, > [], > exclude_binaries=True, > name='DartVader', > debug=False, > bootloader_ignore_signals=False, > strip=False, > upx=True, > console=False, > disable_windowed_traceback=False, > argv_emulation=False, > target_arch=None, > codesign_identity=None, > entitlements_file=None, > icon=['/Volumes/Mac 2TB/Work/Projects/DartDev/dart.icns'], > ) > coll = COLLECT( > exe, > a.binaries, > a.zipfiles, > a.datas, > strip=False, > upx=True, > upx_exclude=[], > name='DartVader', > ) > app = BUNDLE( > coll, > name='DartVader.app', > icon='/Volumes/Mac 2TB/Work/Projects/DartDev/dart.icns', > bundle_identifier=None, > ) > > Package Details one pyinstaller has completed. > [image: Package Info from OneFile.png] > [image: Compile Errors.png] > > Any assistance appreciated > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/bf53db89-d9ac-4d57-ba79-234125923960n%40googlegroups.com.