Skip to content Skip to sidebar Skip to footer

How To Serve Multiple Matplotlib Images From Cherrypy?

I have the following HelloWorld project using Python 3 and cherrypy that serves 2 matplotlib images: import cherrypy import matplotlib.pyplot as plt import numpy as np from io imp

Solution 1:

Turns out this is a threading issue with the matplotlib backend tkinter. Manually changing the backend via matplotlib.use('agg') fixed it. Note that that snippet has to be placed before importing matplotlib.pyplot.


Post a Comment for "How To Serve Multiple Matplotlib Images From Cherrypy?"