函数bug及处理

read_FFexcels报错

raise XLRDError('Unsupported format, or corrupt file: ' + msg)
XLRDError: Unsupported format, or corrupt file: Expected BOF record; found b'\tRui HUA'

处理:检查文件路径 存在临时文件 ~$

for root,dirs,files in os.walk(path):
    print("-----------root--------")
    print(root)
    print("---------- dir--------")
    for name in dirs:
        file_name = os.path.join(root,name)
        print(file_name)
    print("-----------file---------")
    for name in files:
        file_name = os.path.join(root,name)
        print(file_name)
posted @ 2022-10-13 15:45  HR的笔记本  阅读(46)  评论(0编辑  收藏  举报