正在尝试pickle language_tool_python.language_tool_python模块的language_tool('en-US')。 如何修复以下问题
import language_tool_python
import pickle
tool = language_tool_python.LanguageTool('en-US')
with open("lang_tool_pickle", "wb") as file:
pickle.dump(tool, file)
这会产生以下错误:
TypeError Traceback (most recent call last)
<ipython-input-27-caf8effcda8a> in <module>()
1 with open("lang_tool_pickle", "wb") as file:
----> 2 pickle.dump(tool, file)
TypeError: can't pickle _thread.lock objects
目前没有回答
相关问题 更多 >
编程相关推荐