I\'m using flask, matplotlib to save image and tensorflow to create a session. I\'m getting the above error when I run the following code. Does the flask route run on a separate
I was on the same situation, Flask with Matplotlib combo. What worked for me is to specify Agg as Matplotlib backend.
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# Your code here
You can refer to Matplotlib documentation (Matplotlib in a web application server) for the details.