super(type, obj): obj must be an instance or subtype of type

前端 未结 5 1299
天涯浪人
天涯浪人 2020-12-11 00:34

I work on a small Django app and get an error tells me, super(type, obj): obj must be an instance or subtype of type. I get it from the view

5条回答
  •  伪装坚强ぢ
    2020-12-11 00:50

    Another way this error can occur is when you reload the module with the class in a Jupiter notebook.

    Easy solution is to restart the kernel.

    http://thomas-cokelaer.info/blog/2011/09/382/

    Check out @Mike W's answer for more detail.

提交回复
热议问题