I have a folder "uploads" nested in "img" nested in my "static" folder. I am using the path "/static/img/uploads" to get a list of the files in the uploads folder. But I keep getting the error FileNotFoundError: [Errno 2] No such file or directory: '/static/img/uploads'. Why would this be happening? The application.py file and static folder are both in a folder called "final" so I didn't think I needed to add any other direction to get to the uploads folder. Here is the code I have right now:
path = '/static/img/uploads'
images = os.listdir(path)
I'm not sure what other information you would need to help me figure out what the problem is and I can always add more coding if it would be helpful. Here is a screenshot of the directory I am referring to: