I use matplotlib to create some charts, using the AGG
backend.
import matplotlib
matplotlib.use('AGG')
import matplotlib.plot as plt
# ...
def chart_view(request):
fig = plt.figure
# Do stuff with fig and finally save it in a Django HttpResponse
# object and return the HttpResponse object.
Now I have a web page that has three images, all three images resulting in running chart_view
. Only one image usually makes it, and the Django development server stops with "Fatal Python error: GC object already tracked". I'm not certain the problem is in matplotlib
, it could be in pandas
.
How can I debug the problem?