So yes I know that there is an answer on how to fix this but can someone explain to me what the hell it means?Because I don't know where it comes from and I also don't know what indented means in programming (as you can understand dear reader English is not my native tongue).
P.S I found that error from a for-loop I was trying to execute, and the code was similar to this:
img = img.resize((basewidth,hsize), PIL.Image.ANTIALIAS)
j='.jpg'
s='somepic'
p=img.save(s+'1'+j)
for i in range(2, 659):
if i==21:
i = i + 1
elif i==36:
i=i+1
elif i==45:
i = i + 1
elif i==51:
i = i + 1
elif i==133:
i = i + 1
elif i==163:
i = i + 1
elif i==263:
i = i + 1
elif i==267:
i = i + 1
elif i==272:
i = i + 1
elif i==299:
i = i + 1
elif i==300:
i = i + 1
elif i==312:
i = i + 1
elif i==313:
i = i + 1
elif i==314:
i = i + 1
elif i==320:
i = i + 1
elif i==323:
i = i + 1
elif i==362:
i = i + 1
elif i==390:
i = i + 1
elif i==432:
i = i + 1
elif i==445:
i = i + 1
elif i==455:
i = i + 1
elif i==459:
i = i + 1
elif i==460:
i = i + 1
elif i==461:
i = i + 1
elif i==477:
i = i + 1
elif i==487:
i = i + 1
elif i==493:
i = i + 1
elif i==496:
i = i + 1
elif i==500:
i = i + 1
elif i==510:
i = i + 1
elif i==519:
i = i + 1
elif i==522:
i = i + 1
elif i==545:
i = i + 1
elif i==547:
i = i + 1
elif i==562:
i = i + 1
elif i==597:
i = i + 1
elif i==599:
i = i + 1
elif i==615:
i = i + 1
elif i==638:
i = i + 1
elif i==654:
i=i+1
else:
p= img + "i".save(s+i+j)
i=i+1
Which means a for-loop, an if-statement, a couple of elifs (or ORs inside the first if-statement) and then I am closing my if-statement with a save and a step forward.
EDITED: So the code above is what I have written and before that are a bunch of image inputs.But although I manage to fix the code with what you said at the end I have another error which says ['str' object has no attribute 'save'] but that is a problem for another time.