Issue creating exe file

70 views
Skip to first unread message

Tyler Bishop

unread,
Mar 5, 2025, 11:52:35 PMMar 5
to PyInstaller
When I do pyinstaller - -windowed  - -onefile - - name Name filename.py

WARNING: Execution of 'set_exe_build_timestamp' failed on attempt #1 / 20: Exception("Unable to access file 'C:\\Users\\uncsb\\OneDrive\\Documents\\Python\\WorkProject\\dist\\SHCS.25.3.3.exe': [Errno 22] Invalid argument: 'C:\\\\Users\\\\uncsb\\\\OneDrive\\\\Documents\\\\Python\\\\WorkProject\\\\dist\\\\SHCS.25.3.3.exe'").

I recently upgraded from somewhere in the version 2.5 range. Pyinstaller always created the .exe, but it appears to create the spec file and then runs into that error (which causes additional errors) and I don't understand what's happening. 

When I uninstall and reinstall to check for errors:
Collecting pyinstaller
  Using cached pyinstaller-6.12.0-py3-none-win_amd64.whl.metadata (8.3 kB)
Requirement already satisfied: setuptools>=42.0.0 in c:\users\uncsb\appdata\local\programs\python\python313\lib\site-packages (from pyinstaller) (75.8.2)
Requirement already satisfied: altgraph in c:\users\uncsb\appdata\local\programs\python\python313\lib\site-packages (from pyinstaller) (0.17.4)
Requirement already satisfied: pyinstaller-hooks-contrib>=2025.1 in c:\users\uncsb\appdata\local\programs\python\python313\lib\site-packages (from pyinstaller) (2025.1)
Requirement already satisfied: packaging>=22.0 in c:\users\uncsb\appdata\local\programs\python\python313\lib\site-packages (from pyinstaller) (24.2)
Requirement already satisfied: pefile!=2024.8.26,>=2022.5.30 in c:\users\uncsb\appdata\local\programs\python\python313\lib\site-packages (from pyinstaller) (2023.2.7)
Requirement already satisfied: pywin32-ctypes>=0.2.1 in c:\users\uncsb\appdata\local\programs\python\python313\lib\site-packages (from pyinstaller) (0.2.3)
Using cached pyinstaller-6.12.0-py3-none-win_amd64.whl (1.3 MB)
Installing collected packages: pyinstaller
Successfully installed pyinstaller-6.12.0

Steve Barnes

unread,
Mar 6, 2025, 4:14:04 AMMar 6
to pyins...@googlegroups.com

Hi Tyler,

 

This might be a red herring but I noticed that you are working in a OneDrive mapped location – in the past I have had issues where files written to such a location are not available until after a slight delay, not sure what OneDrive is doing but it is doing something, it is possible that PyInstaller is trying to change the date/time of the file after it says that it is written but while it is still in a limbo state. (I have also had similar issues with certain anti-virus products).

 

Can I suggest trying moving/copying your directory structure to a location that is not under the control of OneDrive and if possible is excluded from your anti-virus scans.

 

Hope that is helpful.

 

Steve

--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pyinstaller/4aabda79-8bfa-433b-806f-736bcb6684d6n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages