Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

sanitize error: IndexError: list index out of range #15

Open
maxlath opened this issue Jun 24, 2015 · 3 comments
Open

sanitize error: IndexError: list index out of range #15

maxlath opened this issue Jun 24, 2015 · 3 comments

Comments

@maxlath
Copy link

maxlath commented Jun 24, 2015

running pdf-redact-tools --sanitize an-untrusted.pdf I got the following error:

Converting PDF to PNGs
Flattening PNGs
Traceback (most recent call last):
  File "/usr/bin/pdf-redact-tools", line 178, in <module>
    main()
  File "/usr/bin/pdf-redact-tools", line 170, in main
    if pdfrt.explode():
  File "/usr/bin/pdf-redact-tools", line 83, in explode
    filename_template = os.path.join(self.pages_dirname, filenames[0].replace('-0.png', '-{}.png'))
IndexError: list index out of range

It's a 5 Mo file, could that be too large for this operation? Any other clue on what could be the issue?

context:

  • Ubuntu 14.10
  • pdf-redact-tools installed from built .deb package

thanks in advance!

@ariccio
Copy link

ariccio commented Jun 25, 2015

It looks a bit more like filenames is an empty list, thus there's no valid index. It's filled with the list of files in a directory... it must have somehow been filled with an empty directory?

@bogomya
Copy link

bogomya commented Apr 6, 2016

I have the same issue. Ubuntu 14.04

@doctorcolossus
Copy link

same issue here - pdf-redact-tools 0.1.2 on Arch Linux

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants