error message is that the save function is missing a value, but I passed this value.
missing 1 required positional arguments
Code snippet:
here the save function in save_file is called, passing an arry parameter
def main(self,c):
p_data = self.post_data(c)
pa = p_data[0]
pb = p_data[1]
arry = self.content(pa,pb)
save_file.save(arry)
here arry is passed into the save function
def save(self,arry):
param = self.create_excel()
workbook = param[0]
sheet = param[1]
biaotou = [""]
self.tab_head(sheet, biaotou)
row = 1
for i, v in enumerate(arry):
for j, k in enumerate(v):
self.write_excel(sheet, row, j, k)
file_path = "E:/"
row += 1
self.save_excel(file_path, workbook)
print("")
run:
is instantiated with parentheses and parameters, but why is this error reported?
if __name__ == "__main__":
hk = hk() -sharp
save_file = save_file() -sharpsave_file
hk.main(c)
print("!")