TIL why my Python script kept crashing on line 12, and it was a naming thing
I was writing my first real script last Tuesday in my kitchen, just a dumb little tool to rename song files in my music folder. It kept crashing with a KeyError on line 12, and I stared at it for 40 minutes thinking my dictionary was broken. Turns out I named a variable 'list' earlier in the file, so Python was freaking out every time I tried to use the real list() function later on. I renamed it to 'song_list' and the whole thing worked on the first try after that. Has anyone else messed up by naming a variable after a built-in function? I wanna know I'm not the only one who did this.