我发现此链接很有帮助:http :
//stefaanlippens.net/python-pickling-and-dealing-with-attributeerror-module-
object-has-no-attribute-thing.html
它提供了两种解决方案。更好的解决方案是添加到加载模块(或
__main__)的头部:
from myclassmodule import MyClass
但是我认为应该有一个更好的解决方案。

我发现此链接很有帮助:http :
//stefaanlippens.net/python-pickling-and-dealing-with-attributeerror-module-
object-has-no-attribute-thing.html
它提供了两种解决方案。更好的解决方案是添加到加载模块(或
__main__)的头部:
from myclassmodule import MyClass
但是我认为应该有一个更好的解决方案。