1

I'm getting a permission denied on my code.

There is the error that I get:

Traceback (most recent call last):
  File "E:\Acadamic studies\Major Project\facetrain.py", line 24, in <module>
    faces,ids = getImagesAndLabels(path)
  File "E:\Acadamic studies\Major Project\facetrain.py", line 15, in getImagesAndLabels
    PIL_img = Image.open(imagePath).convert('L') # grayscale
  File "C:\Users\Sonu\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 2968, in open
    fp = builtins.open(filename, "rb")
PermissionError: [Errno 13] Permission denied: 'E:/Acadamic studies/Major Project/dataset\\trainer'
Latra
  • 492
  • 3
  • 14
Sonu
  • 11
  • 2
  • Add a code snippet or something similar to reproduce this issue. See [this](https://stackoverflow.com/help/how-to-ask). – avats Nov 11 '21 at 17:08
  • Does this answer your question? [PermissionError: \[Errno 13\] Permission denied](https://stackoverflow.com/questions/36434764/permissionerror-errno-13-permission-denied) – Latra Nov 11 '21 at 17:23
  • Please [edit] your question to share a [mcve]. Without any code we can only guess why you are getting the error. As mentioned above see [PermissionError: `[`Errno 13`]` Permission denied](https://stackoverflow.com/questions/36434764/permissionerror-errno-13-permission-denied) for general help with this error. – dbc Nov 13 '21 at 03:06

0 Answers0