TypeError: new_row() missing 1 required positional argument: 'self'

def new_row(self):
print(self.var_id.area.get())
print(area)
if str(self.var_id.area.get()) in area:
messagebox.showinfo('警告!', '城市已存在!')
else:
if self.var_id.province.get() != '' and self.var_id.area.get() != '' and self.var_id.number.get() != '':
conn = pymssql.connect('', 'sa', '', 'table') # 服务器名,账户,密码,数据库名 #连接数据库
cursor = conn.cursor() # 创建游标
sql = "INSERT INTO [table].[dbo].[Table](province, area, number) VALUES ('%s', '%s', '%s')" %
(self.var_id.province.get(), self.var_id.area.get(), self.var_id.number.get()) # SQL 插入语句
cursor.execute(sql) # 执行sql语句
conn.commit() # 提交到数据库执行
cursor.close()
conn.close()
province.append(self.var_id.province.get())
area.append(self.var_id.area.get())
number.append(self.var_id.number.get())
treeview.insert('', len(id) - 1, values=(province[len(id) - 1],area[len(id) - 1], number[len(id) - 1]))
treeview.update()
btn2=Button(rightframe,text='录入',command=new_row).grid(row=2,column=1)

TypeError: new_row() missing 1 required positional argument: 'self'

你这个函数new_row是??
是写在类里面的方法?
还是只是一个单独的函数?

command=new_row
改为
command=self.new_row