python脚本里用了xlutils模块的copy函数,但是报错:
Traceback (most recent call last):
File "excel_demo.py", line 10, in
myExcel.setSheet("../data/数据迁移比对.xls")
File "../class/deal_excel.py", line 21, in setSheet
self.mhandle = copy(xlrd.open_workbook(self.filename, formatting_info=True))
TypeError: 'module' object is not callable
提示copy不存在,但是在开头已经声明了
from xlutils import copy
上网搜索以后找到解决方法 ,改成:
from xlutils.copy import copy
问题解决