I am getting a permisson error which traces back to using Image.open in PIL i believe, however all permissions for the folder and subfolders are set.
Here is the code (nested inside a large while loop):
take_screenshot(‘nameplate’, region=nameplate_bounds, folder_path=’wildimages’)
time.sleep(0.05)
take_screenshot(‘base_pk_img’, region=(600, 316, 250, 205), folder_path=’wildimages’)
gender = detect_gender()
name_plate_img = Image.open(‘wildimages/nameplate.png’)
Here is the full error, also the script functions as expected for the first 30-40 minutes before throwing the error:
File “c:/Users/jnots/OneDrive/Desktop/ShinyHunt/sshgshinyhunter.py”, line 493, in
wild_shiny(0.75)
File “c:/Users/jnots/OneDrive/Desktop/ShinyHunt/sshgshinyhunter.py”, line 410, in wild_shiny
name_plate_img = Image.open(‘wildimages/nameplate.png’)
File “C:UsersjnotsOneDriveDesktopShinyHuntenvlibsite-packagesPILImage.py”, line 3277, in open
fp = builtins.open(filename, “rb”)
PermissionError: [Errno 13] Permission denied: ‘C:UsersjnotsOneDriveDesktopShinyHuntwildimagesnameplate.png’
So far Ive set file permissions within command prompt and verified them within the properties of the folders and subfolders, ive also unchecked read only from all of the files, the only thing I can guess now is an issue within Image.open in PIL