异常解决(二)-- AttributeError: cannot assign module before Module.__init__() call
生活随笔
收集整理的這篇文章主要介紹了
异常解决(二)-- 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的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 新商业蓝皮书2021
- 下一篇: 面试薪资这样谈,让你的月薪加倍!