Interesting 'takes exactly 1 argument (2 given)' Python error

前端 未结 6 1831
傲寒
傲寒 2020-12-02 12:19

For the error:

TypeError: takes exactly 1 argument (2 given)

With the following class method:

def extractAll(tag):
   ...
<         


        
6条回答
  •  一生所求
    2020-12-02 12:34

    If a non-static method is member of a class, you have to define it like that:

    def Method(self, atributes..)
    

    So, I suppose your 'e' is instance of some class with implemented method that tries to execute and has too much arguments.

提交回复
热议问题