KeyError: "There is no item named 'xl/drawings/NULL' in the archive

Issue #1238 new
Fabio
created an issue

First time it's ever happened.

Traceback (most recent call last):
  File "C:\Users\Max\Downloads\Python\transfer.py", line 25, in <module>
    documentToCopyFrom = xl.load_workbook(filename = documentToCopyFromName)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\site-packages\openpyxl\reader\excel.py", line 312, in load_workbook
    reader.read()
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\site-packages\openpyxl\reader\excel.py", line 274, in read
    self.read_worksheets()
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\site-packages\openpyxl\reader\excel.py", line 249, in read_worksheets
    charts, images = find_images(self.archive, rel.target)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\site-packages\openpyxl\reader\drawings.py", line 51, in find_images
    image = Image(BytesIO(archive.read(dep.target)))
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\zipfile.py", line 1428, in read
    with self.open(name, "r", pwd) as fp:
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\zipfile.py", line 1467, in open
    zinfo = self.getinfo(name)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python37\lib\zipfile.py", line 1395, in getinfo
    'There is no item named %r in the archive' % name)

It's when I attempt to open a document with a large amount of images in it.

Comments (3)

  1. CharlieC

    Thanks for the report. The weird thing is that the file definitely contains a link to something that with that path: <Relationship Id="rId321" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="NULL"/> Will take some investigation to try and work out what this is supposed to mean.

  2. Log in to comment