PermissionError: [WinError 21] The device is not ready: 'F:\\WallPaper' I have no F drive, so when I change to 'C:\\WallPaper' it works fine you need to find a way to not hard code this line