V
1

Tried using ChatGPT to debug my first Python script and it made it worse lol

I was stuck on a simple loop that wasn't printing right, so I copied my code into ChatGPT asking for help. It gave me a fix that looked fine, but after I ran it, my whole script crashed with an error I'd never even seen before. Spent like 2 hours googling what a 'TypeError' meant because ChatGPT's 'fix' changed my variable names. Has anyone else had AI give them bad advice that actually broke their project worse?
3 comments

Log in to join the discussion

Log In
3 Comments
jessica921
Three times now ChatGPT has renamed my variables to "var1" and "var2" making my code impossible to understand later.
4
gavin_kim
gavin_kim4d ago
Honestly same thing happened to me with a basic while loop, it kept adding random imports I didn't need and broke everything. Tbh I've learned to just ask it for explanations instead of letting it rewrite my code directly, that way I can actually understand what's wrong. Ngl it's wild how it'll just change your whole logic without asking, like chill I just wanted a syntax fix not a whole rewrite.
3
williamw75
Yeah I've had it rename my variables too, feels like it's gaslighting me about my own code.
5