ValueError: min() arg is an empty sequence

Issue #1250 resolved
Arno created an issue

Since version 2.6.2 I've been having issues when loading workbooks.

Whenever I try to load a file I get the following error:

Traceback (most recent call last):
  File "C:/PATH_TO_PROJECT/", line 608, in <module>
    writeCalculatedOffenseFields(closeReason, useCaseFrequency)
  File "C:/PATH_TO_PROJECT/", line 420, in writeCalculatedOffenseFields
    wb = load_workbook(filename='FILENAME.xlsx')
  File "C:\PATH_TO_PROJECT\venv\lib\site-packages\openpyxl\reader\", line 312, in load_workbook
  File "C:\PATH_TO_PROJECT\venv\lib\site-packages\openpyxl\reader\", line 274, in read
  File "C:\PATH_TO_PROJECT\venv\lib\site-packages\openpyxl\reader\", line 249, in read_worksheets
    charts, images = find_images(self.archive,
  File "C:\PATH_TO_PROJECT\venv\lib\site-packages\openpyxl\reader\", line 39, in find_images
    chart = read_chart(cs)
  File "C:\PATH_TO_PROJECT\venv\lib\site-packages\openpyxl\chart\", line 38, in read_chart
    chart.idx_base = min(s.idx for s in chart.series)
ValueError: min() arg is an empty sequence

This seems to be related to the changes made in

I think it happens when chart.series is empty in chart/

Comments (5)

  1. Log in to comment