Remove debug_info from logs. Your script must also work if it is run twice (the second run should not fail).
debug_info
logs
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.