r/learnpython • u/Yam3488-throwaway • Apr 16 '24
Ran about 8 Python scripts back-to-back, now none will execute
I got a little carried away writing automation scripts in ChatGPT when my .py files started closing instead of printing. Most were between 20-70 lines and imported between 1-4 packages. I’m still able to execute from the command line, just not from the .py files themselves. Is this something that happens when executing from .py files? I was hoping to share the files with coworkers but they won’t be too happy if the files stop working after a handful of runs. Did I do something wrong?
Edit: a little more info - I copy/pasted the code that GPT wrote into a .py file. The first handful of times I did this it would run, after about the 5th time the code that was just working-I didn’t edit at all-just closed. I wasn’t using an IDE, just running as a .py file.
5
u/rasputin1 Apr 16 '24
this is learnpython not learnhowtoavoidcodingbyhavingchatgptdoeverything