unable to load workbook with drawings

Issue #972 resolved
lgped
created an issue

ValueError when parsing worksheet:

Traceback (most recent call last):
  File "./wb.py", line 358, in <module>
    data = get_data(sys.argv[1])
  File "./wb.py", line 198, in __init__
    self.ws = load_workbook(filename)[sheet]
  File "/usr/lib/python3.6/site-packages/openpyxl/reader/excel.py", line 274, in load_workbook
    for c in find_charts(archive, rel.target):
  File "/usr/lib/python3.6/site-packages/openpyxl/chart/reader.py", line 43, in find_charts
    drawing = SpreadsheetDrawing.from_tree(tree)
  File "/usr/lib/python3.6/site-packages/openpyxl/descriptors/serialisable.py", line 84, in from_tree
    obj = desc.expected_type.from_tree(el)
  File "/usr/lib/python3.6/site-packages/openpyxl/descriptors/serialisable.py", line 84, in from_tree
    obj = desc.expected_type.from_tree(el)
  File "/usr/lib/python3.6/site-packages/openpyxl/descriptors/serialisable.py", line 84, in from_tree
    obj = desc.expected_type.from_tree(el)
  [Previous line repeated 2 more times]
  File "/usr/lib/python3.6/site-packages/openpyxl/descriptors/serialisable.py", line 100, in from_tree
    return cls(**attrib)
  File "/usr/lib/python3.6/site-packages/openpyxl/drawing/fill.py", line 122, in __init__
    self.pos = pos
  File "/usr/lib/python3.6/site-packages/openpyxl/descriptors/base.py", line 110, in __set__
    super(Min, self).__set__(instance, value)
  File "/usr/lib/python3.6/site-packages/openpyxl/descriptors/base.py", line 89, in __set__
    raise ValueError('Max value is {0}'.format(self.max))
ValueError: Max value is 100

Comments (2)

  1. CharlieC

    Please provide a sample file, though I suspect this is related to the GradientStops and has already been fixed in the 2.5 branch. You can check by using a checkout (see the documentation for details).

  2. Log in to comment