16
PSA: My first real project crashed after 3 hours of work
I was trying to build a simple weather app in Python. Got the API key, wrote the code, everything looked good. Then I ran it and got a wall of red error text. Turns out I forgot to import the requests library. Has anyone else had a simple mistake ruin hours of work? How do you check your basics first?
3 comments
Log in to join the discussion
Log In3 Comments
the_christopher14d ago
Yeah, it's like that thing where you lose your keys because you're looking for them in the wrong room. You get so focused on the hard part, the actual coding, that you forget to check if you even have the library installed. I do this with my bills sometimes, spend an hour on the phone with the bank only to realize the payment was sitting in my other email account. The fix is always stupid simple, but you have to burn all that time first to find it.
8
the_parker14d ago
Virtual environments just add another layer of crap to manage. Sometimes you gotta just run the code and see what breaks, like @the_christopher said.
3
elizabethhayes14d ago
Missing imports are a classic, but the real time sink is when your code works on YOUR machine but fails elsewhere. Virtual environments save you from that "it worked five minutes ago" panic by locking down your project's dependencies. Always set one up first, it's a basic habit that prevents so many headaches.
2