T
-1

I finally got my Python script to work, took 6 days over a missing colon

Six days for one tiny character. I was building a little script to rename a bunch of photo files in my Downloads folder, maybe 400 pictures. Every time I ran it, it just stopped halfway with some weird error about a variable not being defined. I checked my loops, my if statements, even rewrote the whole thing twice. On day 6 I finally pasted the error into a forum from 2018 and someone pointed out I was missing a colon after my function definition. Not a syntax error that flagged it, it just treated the next line as part of the wrong block. I felt so dumb. But honestly, I learned more about indentation and Python's quirks in those 6 days than in any tutorial. Has anyone else burned a whole week on something that turned out to be a single character?
0 comments

Log in to join the discussion

Log In
0 Comments

No comments yet

Be the first to share your thoughts on this discussion.