Permission denied, Execution of 'copyfile' failed - no more attempts left #8967
Unanswered
FireQuakrOfficial
asked this question in
Help
Replies: 1 comment 1 reply
-
We cannot copy the new bootloader executable to the specified location. Either because your anti-virus program is blocking access to it, or the executable is locked for some other reason - for example, you tried to run it and one of its (sub)processes is still running in the background. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to convert my main.py into an exe and it gave me this error. I am relatively new to python, as i mostly work with java, and have no clue what to do to fix this. I will paste the terminal output below.
(.venv) PS E:\DeBlock_Super\DeBlock_Super> pyinstaller main.py --onefile
189 INFO: PyInstaller: 6.11.1, contrib hooks: 2024.11
190 INFO: Python: 3.12.5
228 INFO: Platform: Windows-11-10.0.22631-SP0
228 INFO: Python environment: E:\DeBlock_Super\DeBlock_Super.venv
278 INFO: wrote E:\DeBlock_Super\DeBlock_Super\main.spec
281 INFO: Module search paths (PYTHONPATH):
['E:\DeBlock_Super\DeBlock_Super\.venv\Scripts\pyinstaller.exe',
'C:\Users\User\AppData\Local\Programs\Python\Python312\python312.zip',
'C:\Users\User\AppData\Local\Programs\Python\Python312\DLLs',
'C:\Users\User\AppData\Local\Programs\Python\Python312\Lib',
'C:\Users\User\AppData\Local\Programs\Python\Python312',
'E:\DeBlock_Super\DeBlock_Super\.venv',
'E:\DeBlock_Super\DeBlock_Super\.venv\Lib\site-packages',
'E:\DeBlock_Super\DeBlock_Super\.venv\Lib\site-packages\setuptools\_vendor',
'E:\DeBlock_Super\DeBlock_Super']
696 INFO: checking Analysis
774 INFO: checking PYZ
821 INFO: checking PKG
890 INFO: Bootloader E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\run.exe
891 INFO: checking EXE
891 INFO: Building EXE because EXE-00.toc is non existent
891 INFO: Building EXE from EXE-00.toc
891 INFO: Copying bootloader EXE to E:\DeBlock_Super\DeBlock_Super\dist\main.exe
892 WARNING: Execution of 'copyfile' failed on attempt #1 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.05 second(s)...
946 WARNING: Execution of 'copyfile' failed on attempt #2 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.06 second(s)...
1002 WARNING: Execution of 'copyfile' failed on attempt #3 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.06 second(s)...
1063 WARNING: Execution of 'copyfile' failed on attempt #4 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.06 second(s)...
1126 WARNING: Execution of 'copyfile' failed on attempt #5 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.07 second(s)...
1194 WARNING: Execution of 'copyfile' failed on attempt #6 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.07 second(s)...
1267 WARNING: Execution of 'copyfile' failed on attempt #7 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.08 second(s)...
1345 WARNING: Execution of 'copyfile' failed on attempt #8 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.08 second(s)...
1429 WARNING: Execution of 'copyfile' failed on attempt #9 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.09 second(s)...
1522 WARNING: Execution of 'copyfile' failed on attempt #10 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.10 second(s)...
1622 WARNING: Execution of 'copyfile' failed on attempt #11 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.11 second(s)...
1735 WARNING: Execution of 'copyfile' failed on attempt #12 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.12 second(s)...
1861 WARNING: Execution of 'copyfile' failed on attempt #13 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.14 second(s)...
2005 WARNING: Execution of 'copyfile' failed on attempt #14 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.17 second(s)...
2173 WARNING: Execution of 'copyfile' failed on attempt #15 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.20 second(s)...
2374 WARNING: Execution of 'copyfile' failed on attempt #16 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.25 second(s)...
2625 WARNING: Execution of 'copyfile' failed on attempt #17 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.33 second(s)...
2959 WARNING: Execution of 'copyfile' failed on attempt #18 / 20: PermissionError(13, 'Permission denied'). Retrying in 0.50 second(s)...
3461 WARNING: Execution of 'copyfile' failed on attempt #19 / 20: PermissionError(13, 'Permission denied'). Retrying in 1.00 second(s)...
4462 WARNING: Execution of 'copyfile' failed on attempt #20 / 20: PermissionError(13, 'Permission denied').
Traceback (most recent call last):
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\api.py", line 1033, in _retry_operation
return func(*args)
^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 262, in copyfile
with open(dst, 'wb') as fdst:
^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'E:\DeBlock_Super\DeBlock_Super\dist\main.exe'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "E:\DeBlock_Super\DeBlock_Super.venv\Scripts\pyinstaller.exe_main.py", line 7, in
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller_main.py", line 231, in console_script_run
run()
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller_main.py", line 215, in run
run_build(pyi_config, spec_file, **vars(args))
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller_main_.py", line 70, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\build_main.py", line 1252, in main
build(specfile, distpath, workpath, clean_build)
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\build_main.py", line 1192, in build
exec(code, spec_namespace)
File "E:\DeBlock_Super\DeBlock_Super\main.spec", line 19, in
exe = EXE(
^^^^
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\api.py", line 658, in init
self.postinit()
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\datastruct.py", line 184, in postinit
self.assemble()
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\api.py", line 761, in assemble
self._retry_operation(shutil.copyfile, bootloader_exe, build_name)
File "E:\DeBlock_Super\DeBlock_Super.venv\Lib\site-packages\PyInstaller\building\api.py", line 1052, in _retry_operation
raise RuntimeError(f"Execution of {func_name!r} failed - no more attempts left!") from e
RuntimeError: Execution of 'copyfile' failed - no more attempts left!
Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions