To tell we need more details, like what imports do you have, what calls did you make and most important, what’s the acctual error message
The easiest way to get you help would be if you shared your notebook (File>Share, make shure the dropdown has “Public” selected) but at least paste all the code that you think is relevant to the issue and the stack trace.
Its not clear which line the error is occuring on. To help your own analysis, you can make this more visible by putting a print("1") and print("2") etc between each line, and also print the variables. Extract the save path to a variable so you can print it before you use it like this… img.save(save_path)