[GH-ISSUE #426] When building exe - every command is duplicated #337

Closed
opened 2026-02-26 12:21:16 +03:00 by kerem · 15 comments
Owner

Originally created by @alexbk66 on GitHub (Sep 6, 2023).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/426

Originally assigned to: @brentvollebregt on GitHub.

Your Environment:

  • Python version: Python 3.10.11
  • auto-py-to-exe version: 2.37.0
  • PyInstaller version: 5.13.0
  • Eel version: 0.16.0

Build often fails with "access denied" message. But the I realised that auto-py-to-exe runs twice, i.e. I'm getting in Output window:

Running auto-py-to-exe v2.37.0
Running auto-py-to-exe v2.37.0
Building directory: c:\Temp\tmp9se7his7
Building directory: c:\Temp\tmp9se7his7

Which probably explains the "access denied" message - because the output file is locked by one process, when the other one tries to write the file.

image

Originally created by @alexbk66 on GitHub (Sep 6, 2023). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/426 Originally assigned to: @brentvollebregt on GitHub. **Your Environment:** - Python version: Python 3.10.11 - auto-py-to-exe version: 2.37.0 - PyInstaller version: 5.13.0 - Eel version: 0.16.0 Build often fails with "access denied" message. But the I realised that auto-py-to-exe runs twice, i.e. I'm getting in Output window: ``` Running auto-py-to-exe v2.37.0 Running auto-py-to-exe v2.37.0 Building directory: c:\Temp\tmp9se7his7 Building directory: c:\Temp\tmp9se7his7 ``` Which probably explains the "access denied" message - because the output file is locked by one process, when the other one tries to write the file. ![image](https://github.com/brentvollebregt/auto-py-to-exe/assets/2533315/c2621b6e-5eee-4fba-b4f0-256e7c0907eb)
kerem 2026-02-26 12:21:16 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Sep 6, 2023):

👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.

Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.

<!-- gh-comment-id:1707983663 --> @github-actions[bot] commented on GitHub (Sep 6, 2023): 👋 Hi, just a reminder that if you haven't read [the help post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/) yet, give it a read to see if your issue is covered in it and make sure to follow [the debugging section](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging). Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help [post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/), [video](https://youtu.be/OZSZHmWSOeM) or create a [new discussion](https://github.com/brentvollebregt/auto-py-to-exe/discussions).
Author
Owner

@alexbk66 commented on GitHub (Sep 6, 2023):

FYI, example of the error

164220 ERROR: An error occurred while packaging
Traceback (most recent call last):
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\auto_py_to_exe\packaging.py", line 131, in package
    run_pyinstaller()
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 1019, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 944, in build
    exec(code, spec_namespace)
  File "c:\Temp\tmp9se7his7\demo.spec", line 24, in <module>
    exe = EXE(
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 590, in __init__
    self.__postinit__()
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 830, in assemble
    winutils.set_exe_build_timestamp(build_name, build_timestamp)
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winutils.py", line 178, in set_exe_build_timestamp
    with open(exe_path, 'wb') as fp:
PermissionError: [Errno 13] Permission denied: 'c:\\Temp\\tmp9se7his7\\build\\demo\\demo.exe.notanexecutable'```
<!-- gh-comment-id:1707998140 --> @alexbk66 commented on GitHub (Sep 6, 2023): FYI, example of the error ``` 164220 ERROR: An error occurred while packaging Traceback (most recent call last): File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\auto_py_to_exe\packaging.py", line 131, in package run_pyinstaller() File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 180, in run run_build(pyi_config, spec_file, **vars(args)) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 61, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 1019, in main build(specfile, distpath, workpath, clean_build) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 944, in build exec(code, spec_namespace) File "c:\Temp\tmp9se7his7\demo.spec", line 24, in <module> exe = EXE( File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 590, in __init__ self.__postinit__() File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__ self.assemble() File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 830, in assemble winutils.set_exe_build_timestamp(build_name, build_timestamp) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winutils.py", line 178, in set_exe_build_timestamp with open(exe_path, 'wb') as fp: PermissionError: [Errno 13] Permission denied: 'c:\\Temp\\tmp9se7his7\\build\\demo\\demo.exe.notanexecutable'```
Author
Owner

@brentvollebregt commented on GitHub (Sep 6, 2023):

Does it always output two lots of messages for you or has this only happened once? Also could you provide the full output please - I have a feeling that it is actually running once but you are getting the logs sent to the UI twice.

<!-- gh-comment-id:1708182539 --> @brentvollebregt commented on GitHub (Sep 6, 2023): Does it always output two lots of messages for you or has this only happened once? Also could you provide the full output please - I have a feeling that it is actually running once but you are getting the logs sent to the UI twice.
Author
Owner

@brentvollebregt commented on GitHub (Sep 6, 2023):

I've just pushed up a fix for the double-logging into master in 4938f33270. Looks like you may have reloaded the UI which caused the logging handlers to be added again - this is fixed now.

In terms of the permission denied error, is your antivirus getting in the way?

<!-- gh-comment-id:1708206589 --> @brentvollebregt commented on GitHub (Sep 6, 2023): I've just pushed up a fix for the double-logging into master in 4938f3327063cdde08ee69f07099b44b6be3fe11. Looks like you may have reloaded the UI which caused the logging handlers to be added again - this is fixed now. In terms of the permission denied error, is your antivirus getting in the way?
Author
Owner

@alexbk66 commented on GitHub (Sep 6, 2023):

I think I did reload the UI, it's working now.

Regarding the permission denied error, it happens sometimes, so I have to re-run, sometimes twice. When it happens again, I will post the whole output.

Thank you for great app and quick reply.

<!-- gh-comment-id:1708268255 --> @alexbk66 commented on GitHub (Sep 6, 2023): I think I did reload the UI, it's working now. Regarding the permission denied error, it happens sometimes, so I have to re-run, sometimes twice. When it happens again, I will post the whole output. Thank you for great app and quick reply.
Author
Owner

@alexbk66 commented on GitHub (Sep 6, 2023):

One question - probably should start a separate issue, is it possible to save last setup? Otherwise I have to re-enter all settings every time I start the app. And it quits after some period of inactivity...

<!-- gh-comment-id:1708271450 --> @alexbk66 commented on GitHub (Sep 6, 2023): One question - probably should start a separate issue, is it possible to save last setup? Otherwise I have to re-enter all settings every time I start the app. And it quits after some period of inactivity...
Author
Owner

@alexbk66 commented on GitHub (Sep 7, 2023):

Full output for permission denied error:

Running auto-py-to-exe v2.37.0
Building directory: c:\Temp\tmpnarssb62
Provided command: pyinstaller --noconfirm --onedir --console --add-data "C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/androidtvremote2;androidtvremote2/"  "C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/demo.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onedir --console --add-data C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/androidtvremote2;androidtvremote2/ C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/demo.py --distpath c:\Temp\tmpnarssb62\application --workpath c:\Temp\tmpnarssb62\build --specpath c:\Temp\tmpnarssb62

77723 INFO: PyInstaller: 5.13.0
77732 INFO: Python: 3.10.11
77787 INFO: Platform: Windows-10-10.0.19045-SP0
77795 INFO: wrote c:\Temp\tmpnarssb62\demo.spec
77827 INFO: Extending PYTHONPATH with paths
['C:\\My\\OneDrive\\HomeSeer\\My Plugin\\HS4\\AKAndroidTV\\androidtvremote2']
78552 INFO: Appending 'datas' from .spec
78573 INFO: checking Analysis
78584 INFO: Building Analysis because Analysis-00.toc is non existent
78586 INFO: Initializing module dependency graph...
78617 INFO: Caching module graph hooks...
78659 INFO: Analyzing base_library.zip ...
81170 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
81417 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
84533 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
89326 INFO: Caching module dependency graph...
89577 INFO: running Analysis Analysis-00.toc
89648 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\python.exe
89729 WARNING: lib not found: api-ms-win-appmodel-runtime-l1-1-0.dll dependency of C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\python.exe
90366 INFO: Analyzing C:\My\OneDrive\HomeSeer\My Plugin\HS4\AKAndroidTV\androidtvremote2\demo.py
90989 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
91422 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
93618 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
102280 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
104194 INFO: Loading module hook 'hook-anyio.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
110320 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
110420 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'...
111071 INFO: Processing module hooks...
111786 INFO: Looking for ctypes DLLs
111810 INFO: Analyzing run-time hooks ...
111831 INFO: Including run-time hook 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
111856 INFO: Including run-time hook 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
111886 INFO: Including run-time hook 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
111942 INFO: Looking for dynamic libraries
116386 INFO: Looking for eggs
116395 INFO: Using Python library C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\python310.dll
116410 INFO: Found binding redirects: 
[]
116421 INFO: Warnings written to c:\Temp\tmpnarssb62\build\demo\warn-demo.txt
116487 INFO: Graph cross-reference written to c:\Temp\tmpnarssb62\build\demo\xref-demo.html
116640 INFO: checking PYZ
116659 INFO: Building PYZ because PYZ-00.toc is non existent
116662 INFO: Building PYZ (ZlibArchive) c:\Temp\tmpnarssb62\build\demo\PYZ-00.pyz
117401 INFO: Building PYZ (ZlibArchive) c:\Temp\tmpnarssb62\build\demo\PYZ-00.pyz completed successfully.
117442 INFO: checking PKG
117448 INFO: Building PKG because PKG-00.toc is non existent
117463 INFO: Building PKG (CArchive) demo.pkg
117530 INFO: Building PKG (CArchive) demo.pkg completed successfully.
117542 INFO: Bootloader C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\bootloader\Windows-64bit-intel\run.exe
117557 INFO: checking EXE
117573 INFO: Building EXE because EXE-00.toc is non existent
117575 INFO: Building EXE from EXE-00.toc
117588 INFO: Copying bootloader EXE to c:\Temp\tmpnarssb62\build\demo\demo.exe.notanexecutable
117715 INFO: Copying icon to EXE
117736 INFO: Copying icons from ['C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico']
117786 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
117791 INFO: Writing RT_ICON 1 resource with 3752 bytes
117795 INFO: Writing RT_ICON 2 resource with 2216 bytes
117803 INFO: Writing RT_ICON 3 resource with 1384 bytes
117819 INFO: Writing RT_ICON 4 resource with 37019 bytes
117823 INFO: Writing RT_ICON 5 resource with 9640 bytes
117835 INFO: Writing RT_ICON 6 resource with 4264 bytes
117850 INFO: Writing RT_ICON 7 resource with 1128 bytes
117870 INFO: Copying 0 resources to EXE
117876 INFO: Embedding manifest in EXE
117899 INFO: Updating manifest in c:\Temp\tmpnarssb62\build\demo\demo.exe.notanexecutable
117951 INFO: Updating resource type 24 name 1 language 0
117966 INFO: Appending PKG archive to EXE
118000 INFO: Fixing EXE headers
An error occurred while packaging
Traceback (most recent call last):
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\auto_py_to_exe\packaging.py", line 131, in package
    run_pyinstaller()
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 1019, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 944, in build
    exec(code, spec_namespace)
  File "c:\Temp\tmpnarssb62\demo.spec", line 24, in <module>
    exe = EXE(
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 590, in __init__
    self.__postinit__()
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 831, in assemble
    winutils.update_exe_pe_checksum(build_name)
  File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winutils.py", line 207, in update_exe_pe_checksum
    with open(exe_path, 'wb') as fp:
PermissionError: [Errno 13] Permission denied: 'c:\\Temp\\tmpnarssb62\\build\\demo\\demo.exe.notanexecutable'

Project output will not be moved to output folder
Complete.
<!-- gh-comment-id:1709481646 --> @alexbk66 commented on GitHub (Sep 7, 2023): Full output for permission denied error: ``` Running auto-py-to-exe v2.37.0 Building directory: c:\Temp\tmpnarssb62 Provided command: pyinstaller --noconfirm --onedir --console --add-data "C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/androidtvremote2;androidtvremote2/" "C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/demo.py" Recursion Limit is set to 5000 Executing: pyinstaller --noconfirm --onedir --console --add-data C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/androidtvremote2;androidtvremote2/ C:/My/OneDrive/HomeSeer/My Plugin/HS4/AKAndroidTV/androidtvremote2/demo.py --distpath c:\Temp\tmpnarssb62\application --workpath c:\Temp\tmpnarssb62\build --specpath c:\Temp\tmpnarssb62 77723 INFO: PyInstaller: 5.13.0 77732 INFO: Python: 3.10.11 77787 INFO: Platform: Windows-10-10.0.19045-SP0 77795 INFO: wrote c:\Temp\tmpnarssb62\demo.spec 77827 INFO: Extending PYTHONPATH with paths ['C:\\My\\OneDrive\\HomeSeer\\My Plugin\\HS4\\AKAndroidTV\\androidtvremote2'] 78552 INFO: Appending 'datas' from .spec 78573 INFO: checking Analysis 78584 INFO: Building Analysis because Analysis-00.toc is non existent 78586 INFO: Initializing module dependency graph... 78617 INFO: Caching module graph hooks... 78659 INFO: Analyzing base_library.zip ... 81170 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 81417 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 84533 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 89326 INFO: Caching module dependency graph... 89577 INFO: running Analysis Analysis-00.toc 89648 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\python.exe 89729 WARNING: lib not found: api-ms-win-appmodel-runtime-l1-1-0.dll dependency of C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\python.exe 90366 INFO: Analyzing C:\My\OneDrive\HomeSeer\My Plugin\HS4\AKAndroidTV\androidtvremote2\demo.py 90989 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 91422 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 93618 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'... 102280 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'... 104194 INFO: Loading module hook 'hook-anyio.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'... 110320 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 110420 INFO: Loading module hook 'hook-platform.py' from 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks'... 111071 INFO: Processing module hooks... 111786 INFO: Looking for ctypes DLLs 111810 INFO: Analyzing run-time hooks ... 111831 INFO: Including run-time hook 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py' 111856 INFO: Including run-time hook 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py' 111886 INFO: Including run-time hook 'C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py' 111942 INFO: Looking for dynamic libraries 116386 INFO: Looking for eggs 116395 INFO: Using Python library C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\python310.dll 116410 INFO: Found binding redirects: [] 116421 INFO: Warnings written to c:\Temp\tmpnarssb62\build\demo\warn-demo.txt 116487 INFO: Graph cross-reference written to c:\Temp\tmpnarssb62\build\demo\xref-demo.html 116640 INFO: checking PYZ 116659 INFO: Building PYZ because PYZ-00.toc is non existent 116662 INFO: Building PYZ (ZlibArchive) c:\Temp\tmpnarssb62\build\demo\PYZ-00.pyz 117401 INFO: Building PYZ (ZlibArchive) c:\Temp\tmpnarssb62\build\demo\PYZ-00.pyz completed successfully. 117442 INFO: checking PKG 117448 INFO: Building PKG because PKG-00.toc is non existent 117463 INFO: Building PKG (CArchive) demo.pkg 117530 INFO: Building PKG (CArchive) demo.pkg completed successfully. 117542 INFO: Bootloader C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\bootloader\Windows-64bit-intel\run.exe 117557 INFO: checking EXE 117573 INFO: Building EXE because EXE-00.toc is non existent 117575 INFO: Building EXE from EXE-00.toc 117588 INFO: Copying bootloader EXE to c:\Temp\tmpnarssb62\build\demo\demo.exe.notanexecutable 117715 INFO: Copying icon to EXE 117736 INFO: Copying icons from ['C:\\Users\\kha047\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico'] 117786 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes 117791 INFO: Writing RT_ICON 1 resource with 3752 bytes 117795 INFO: Writing RT_ICON 2 resource with 2216 bytes 117803 INFO: Writing RT_ICON 3 resource with 1384 bytes 117819 INFO: Writing RT_ICON 4 resource with 37019 bytes 117823 INFO: Writing RT_ICON 5 resource with 9640 bytes 117835 INFO: Writing RT_ICON 6 resource with 4264 bytes 117850 INFO: Writing RT_ICON 7 resource with 1128 bytes 117870 INFO: Copying 0 resources to EXE 117876 INFO: Embedding manifest in EXE 117899 INFO: Updating manifest in c:\Temp\tmpnarssb62\build\demo\demo.exe.notanexecutable 117951 INFO: Updating resource type 24 name 1 language 0 117966 INFO: Appending PKG archive to EXE 118000 INFO: Fixing EXE headers An error occurred while packaging Traceback (most recent call last): File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\auto_py_to_exe\packaging.py", line 131, in package run_pyinstaller() File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 180, in run run_build(pyi_config, spec_file, **vars(args)) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 61, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 1019, in main build(specfile, distpath, workpath, clean_build) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 944, in build exec(code, spec_namespace) File "c:\Temp\tmpnarssb62\demo.spec", line 24, in <module> exe = EXE( File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 590, in __init__ self.__postinit__() File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__ self.assemble() File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\api.py", line 831, in assemble winutils.update_exe_pe_checksum(build_name) File "C:\Users\kha047\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winutils.py", line 207, in update_exe_pe_checksum with open(exe_path, 'wb') as fp: PermissionError: [Errno 13] Permission denied: 'c:\\Temp\\tmpnarssb62\\build\\demo\\demo.exe.notanexecutable' Project output will not be moved to output folder Complete. ```
Author
Owner

@brentvollebregt commented on GitHub (Sep 7, 2023):

Regarding the permission denied error, it happens sometimes, so I have to re-run, sometimes twice. When it happens again, I will post the whole output.

Is your antivirus deleting the file by any chance?

One question - probably should start a separate issue, is it possible to save last setup? Otherwise I have to re-enter all settings every time I start the app. And it quits after some period of inactivity...

Check out the "Configuration" header in the "Setting" section - it allows you to save the current UI setup

<!-- gh-comment-id:1709672473 --> @brentvollebregt commented on GitHub (Sep 7, 2023): > Regarding the permission denied error, it happens sometimes, so I have to re-run, sometimes twice. When it happens again, I will post the whole output. Is your antivirus deleting the file by any chance? > One question - probably should start a separate issue, is it possible to save last setup? Otherwise I have to re-enter all settings every time I start the app. And it quits after some period of inactivity... Check out the "Configuration" header in the "Setting" section - it allows you to save the current UI setup
Author
Owner

@alexbk66 commented on GitHub (Sep 7, 2023):

Is your antivirus deleting the file by any chance?

Not sure. I only have WindowsDefender (Win10)

Check out the "Configuration" header in the "Setting" section - it allows you to save the current UI setup

Thank you!!!

<!-- gh-comment-id:1709803022 --> @alexbk66 commented on GitHub (Sep 7, 2023): > Is your antivirus deleting the file by any chance? Not sure. I only have WindowsDefender (Win10) > Check out the "Configuration" header in the "Setting" section - it allows you to save the current UI setup Thank you!!!
Author
Owner

@brentvollebregt commented on GitHub (Sep 7, 2023):

Could you try disabling Windows Defender and try running the package again? I'm interested to see if you still get the issue,

<!-- gh-comment-id:1710044377 --> @brentvollebregt commented on GitHub (Sep 7, 2023): Could you try disabling Windows Defender and try running the package again? I'm interested to see if you still get the issue,
Author
Owner

@alexbk66 commented on GitHub (Sep 7, 2023):

It's happening randomly and not often, so it's hard to verify, but I'll try.

<!-- gh-comment-id:1710307362 --> @alexbk66 commented on GitHub (Sep 7, 2023): It's happening randomly and not often, so it's hard to verify, but I'll try.
Author
Owner

@alexbk66 commented on GitHub (Sep 8, 2023):

Check out the "Configuration" header in the "Setting" section - it allows you to save the current UI setup

I know I'm using this issue for 3 different issues, sorry.

I just noticed that the config json doesn't include output (destination) folder?

<!-- gh-comment-id:1711248652 --> @alexbk66 commented on GitHub (Sep 8, 2023): > Check out the "Configuration" header in the "Setting" section - it allows you to save the current UI setup I know I'm using this issue for 3 different issues, sorry. I just noticed that the config json doesn't include output (destination) folder?
Author
Owner

@brentvollebregt commented on GitHub (Sep 8, 2023):

I just noticed that the config json doesn't include output (destination) folder?

Check out this comment on #197 - it has an example of how to add it manually.

Directly from the README.md in this repository:

This JSON config export action does not save the output directory automatically as moving hosts could mean different directory structures. If you want to have the output directory in the JSON config, add the directory under nonPyinstallerOptions.outputDirectory in the JSON file (will need to create a new key).

<!-- gh-comment-id:1711471115 --> @brentvollebregt commented on GitHub (Sep 8, 2023): > I just noticed that the config json doesn't include output (destination) folder? [Check out this comment](https://github.com/brentvollebregt/auto-py-to-exe/issues/197#issuecomment-926572074) on #197 - it has an example of how to add it manually. Directly from the README.md in this repository: > This JSON config export action does not save the output directory automatically as moving hosts could mean different directory structures. If you want to have the output directory in the JSON config, add the directory under `nonPyinstallerOptions.outputDirectory` in the JSON file (will need to create a new key).
Author
Owner

@alexbk66 commented on GitHub (Sep 8, 2023):

Thank you Brent. I call it RTFM :)

<!-- gh-comment-id:1711498378 --> @alexbk66 commented on GitHub (Sep 8, 2023): Thank you Brent. I call it RTFM :)
Author
Owner

@brentvollebregt commented on GitHub (Sep 21, 2023):

Closing this as the fix for the initial issue went out in 2.39.0

<!-- gh-comment-id:1728954691 --> @brentvollebregt commented on GitHub (Sep 21, 2023): Closing this as the fix for the initial issue went out in 2.39.0
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#337
No description provided.