I encountered this error when converting my “app.py” file into executable file by using pyinstaller app.py –onefile.
14907 WARNING: Execution of ‘copyfile’ failed on attempt #1 / 20: PermissionError(13, ‘Permission denied’).
RuntimeError: Execution of ‘copyfile’ failed – no more attempts left!
I’m only trying to run a simple mouse and keyboard controls with this code:
import pyautogui
import time
pyautogui.hotkey("win", "r")
pyautogui.write("notepad")
pyautogui.hotkey("enter")
time.sleep(1)
pyautogui.moveTo(500, 300, 1)
pyautogui.write("Hello World!", .500)
pyautogui.press("t", 2, 1)
pyautogui.press("e", 2, 1)
pyautogui.press("s", 2, 1)
pyautogui.press("t", 2, 1)
New contributor
ecc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.