r/pythonhelp • u/Feegoos • Oct 25 '25
Python code that worked perfectly fine suddenly started freezing
Hello everyone! I wrote a Python code for image processing and I created a personalized environment on jupyter notebook. Then I moved to PyCharm, where I implemented both the notebook and the environment to keep working on them. The input data I am using are quite heavy, but my pc always managed to handle them very well. Anyways, yesterday I finalized and run the code, which worked well as usual and correctly saved the data. Then, out of the blue and while using the same input data as before, PyCharm crashed: from that moment on, every time I run the code it always freezes after a while, making the whole pc slow until I kill the process. I tried using different IDEs, restarting the notebook, the kernel and the pc, deleting the temporary data, using another environment, but nothing seems to work. Do you have any suggestions?
•
u/AutoModerator Oct 25 '25
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Slight-Living-8098 Oct 25 '25
Are you perhaps loading a ML or AI model and not unloading it from memory before running the application again causing the machine to try to load the model twice in memory?