2

我编写了一个脚本来解析 excel 文档。我将脚本转移到另一台机器上,现在出现以下错误:

Traceback (most recent call last):
File "excelReader.py", line 50, in <module>
wb = load_workbook(doc, use_iterators = True)
File "build/bdist.macosx-10.7-intel/egg/openpyxl/reader/excel.py", line 118, in load_workbook
File "build/bdist.macosx-10.7-intel/egg/openpyxl/reader/excel.py", line 69, in repair_central_directory
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf8 in position 169: invalid start byte

这在编写它的机器上工作正常,当我删除use_iterators = True脚本时工作正常。

编辑:我设法通过将文件从桌面移动到文档来临时解决这个问题

4

0 回答 0