Openpyxl错误 - 加载工作簿

时间:2015-05-26 00:18:21

标签: openpyxl

我在加载Excel工作表时遇到错误。

Traceback (most recent call last):
  File "C:\Users\jaiman\Desktop\Python\Latest working code\April - output to excel\Second Program\working ones\prog_classify_may25.py", line 13, in <module>

  wb = load_workbook(filename)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\excel.py", line 149, in load_workbook_load_workbook(wb, archive, filename, read_only, keep_vba)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\excel.py", line 236, in _load_workbook_color_index=wb._colors)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\worksheet.py", line 327, in read_worksheet fast_parse(ws, xml_source, shared_strings, style_table, color_index)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\worksheet.py", line 315, in fast_parse
    parser.parse()
  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\worksheet.py", line 94, in parse
    dispatcher[tag_name](element)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\worksheet.py", line 189, in parse_row_dimensions
    self.parse_cell(cell)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\reader\worksheet.py", line 135, in parse_cell
    self.ws._add_cell(cell)

  File "C:\Python34\lib\site-packages\openpyxl-2.2.2-py3.4.egg\openpyxl\worksheet\worksheet.py", line 386, in _add_cell
    self._cells[cell.coordinate] = cell
MemoryError

但我没有使用任何颜色或任何此类包装。

1 个答案:

答案 0 :(得分:0)

这看起来像是内存错误。尝试使用只读模式。