AttributeError, XX instance has no attribute XX.一眼看来,完全没错,仔细确认发现,定义init需要有两个_ _,忘了一个,就会出错。

本来是__init__()函数,但有几个类的构造函数成了__init_,少了一个'_'符号。


用Python和Pygame写游戏---AttributeError

相关文章:

  • 2021-08-30
  • 2021-12-18
  • 2021-08-06
  • 2022-01-07
  • 2021-12-12
  • 2021-12-09
  • 2021-06-11
  • 2021-06-25
猜你喜欢
  • 2021-11-29
  • 2021-04-06
  • 2022-02-06
  • 2021-11-02
  • 1970-01-01
相关资源
相似解决方案