写python的时候报错:

Exception in thread 99:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
    self.run()
  File "thread.py", line 31, in run
    RunYun(  a, b, c, d, e, f )
  File "thread.py", line 36, in RunYun
    DbProxy.instance.insert(a, b)
TypeError: insert() takes exactly 2 arguments (3 given)

明明定义的就是2个参数,为什么老是报错说少参数?

这个错误出现几次了,脑回路还是要卡一下。因为类里面的函数第一个参数要写self,剩下的才算。<-_<-

posted on 2018-09-29 15:08  步孤天  阅读(1129)  评论(0编辑  收藏  举报