异常解决-- AttributeError: cannot assign module before Module.__init__() call
Posted 奋斗丶
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了异常解决-- AttributeError: cannot assign module before Module.__init__() call相关的知识,希望对你有一定的参考价值。
在调代码的过程中,总会出现各种各样的错误,这次就犯了一个非常愚蠢的错误,在此记录。
AttributeError: cannot assign module before Module.__init__() call
出现这个错误的原因非常简单,调用了自定义的类,但是在自定义的类的__init__函数下面没有写super( XXX, self ).init()
- 错误案例
- 正确案例
大家在写代码的过程中一定要细心细心细心!
觉得写的不错的话,欢迎点赞+评论+收藏,这对我帮助很大!
以上是关于异常解决-- AttributeError: cannot assign module before Module.__init__() call的主要内容,如果未能解决你的问题,请参考以下文章