Flask stuck loading after opening a certain route with a function
Flask stuck loading after opening a certain route with a function I'm relatively new to Python and Flask. I've been trying to create a web application that reads data readings from a .txt file and plots them onto a matplotlib plot. In this web-app, I have a front page with 3 buttons. These buttons redirect to different routes with functions that read data and plot them onto a matplotlib plot. The web-app works perfectly only for the first time I go to either of these routes. After that nothing loads anymore. I guess I have an infinite loop of some sort but I can't figure it out. Also, after the website gets stuck the Python process starts consuming more resources. The problem persists only when I open this route on the web-app: @app.route("/temperature/") This loads without problems on the web-page, but only for one time and the whole web-app gets stuck and I cannot access any of the other routes either. Thanks in advance! EDIT 1 - Whole code below cloudapp.py (P...