[Fixed]-Django crashes on the second form POST while creating a matplotlib.pyplot image from a pandas object

1👍

I had the same problem, and I find out that there was a problem with the backend that matplotlib was using, to solve this, the recommended backend is Agg, and you should set this up before importing pyplot:

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as pyplot

You can find more documentation here.

👤David

Leave a comment