python AttributeError: exit 这是什么错误
你可能要贴出完整的代码才行,猜测你出错的代码可能是在with语句块中。下面是在stackoverflow撒花姑娘找到的一句话with statement is for object that have __enter__ and __exit__ functions, i.e. Context Manager Types希望对你有些启发
with statement is for object that have __enter__ and __exit__ functions, i.e. Context Manager Types
没有这个属性,或者定义有问题