9
My first real program crashed and I had to fix it for three days straight
I built a simple budget tracker in Python for my shop's parts orders. It worked fine on my computer, but when I sent it to my buddy to test, it just showed a blank screen on his. No error, nothing. I spent the whole weekend checking my code, line by line. The problem was the file path. I wrote it to look for the data file in 'C:/Users/Max/Documents', which obviously only exists on MY machine. I felt so dumb. I had to learn about relative paths versus absolute paths, which was a whole new headache. It took me until Tuesday night to get it working on his computer. Has anyone else had a simple mistake like a file path totally break their project for someone else?
3 comments
Log in to join the discussion
Log In3 Comments
roberth6621d ago
Pathlib is just extra steps for no real gain.
2
the_charlie21d ago
My first Flask app broke for the same reason, so I always use pathlib now.
1
amy_lewis21d ago
Pathlib is fine, but @the_charlie, calling it a must-have seems overblown. Plenty of big apps run for years just using os.path.join without any drama. It's just a different way to write the path string.
2