我正在几个线程中创建pyplot图形。我在日志中看到此错误。 plt
是matplotlib.pyplot
。为什么该图无法闭合?
[2018-10-12 21:39:30,474: WARNING/ForkPoolWorker-116] Exception in thread Thread-30:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/opt/app/jobs/jobs/graphing.py", line 135, in run
self.data, graph_type, self.batch_name, self.exp_names, filename
File "/opt/app/jobs/jobs/graphing.py", line 295, in generate_plot
plt.close(figure)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 675, in close
_pylab_helpers.Gcf.destroy_fig(arg)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/_pylab_helpers.py", line 69, in destroy_fig
cls.destroy(num)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/_pylab_helpers.py", line 58, in destroy
cls._activeQue.remove(manager)
ValueError: list.remove(x): x not in list