I am trying to rename images in a folder based on names stored in a .csv.
I realy don't understand what's the issue with below code. The images and .csv are in the same folder
with open('labels.csv', 'r') as f:
lines = csv.reader(f, delimiter = ',')
for line in lines:
os.rename(line[0], line[1] + str('.png'))
I get below error.
FileNotFoundError: [WinError 2] The system cannot find the file specified: '100000.png' -> '1.png'
I tried this in the past (a while ago) and worked. Is the issue in the .csv, the logic or the images?