S
9

My Python script kept crashing after 100 lines until I added one simple check.

I was pulling data from a website for a school project and the program would just stop every single time. Turns out I wasn't checking if the webpage element existed before trying to grab its text, so it would fail silently. What's the most common beginner mistake you've had to fix in your own code?
2 comments

Log in to join the discussion

Log In
2 Comments
nancybailey
Forgetting to close files or database connections always came back to bite me later.
2
nancy_smith
Ugh, I read somewhere that open connections can lock up system resources. It makes the whole app slow for everyone else. Definitely a sneaky way to cause bigger problems.
5