相关疑难解决方法(0)

Matplotlib - Tcl_AsyncDelete:错误的线程删除了异步处理程序?

我问这个问题,因为我无法解决一个问题Python/Django(实际上在纯Python中,没问题)导致了这个问题RuntimeError: tcl_asyncdelete async handler deleted by the wrong thread.这在某种程度上与我matplotlib在Django中渲染绘图的方式有关.我这样做的方式是:

...
import matplotlib.pyplot as plt
...
fig = plt.figure()
...
plt.close()
Run Code Online (Sandbox Code Playgroud)

我极其简化了我的代码.但问题是 - 即使我只有一行代码:

fig = plt.figure()
Run Code Online (Sandbox Code Playgroud)

我看到这个RuntimeError正在发生.我希望我能解决这个问题,如果我知道在Python/Django中关闭/清理/破坏绘图的正确方法.

python django matplotlib

16
推荐指数
2
解决办法
1万
查看次数

标签 统计

django ×1

matplotlib ×1

python ×1