SyntaxFix
Write A Post
Hire A Developer
Questions
You can solve it by adding these two lines in the VERY beginning of your .py script.
import matplotlib matplotlib.use('Agg')
PS: The error will still exists if these two lines are not added in the very beginning of the source code.