jesparza / peepdf

Powerful Python tool to analyze PDF documents
http://peepdf.eternal-todo.com
GNU General Public License v3.0
1.32k stars 242 forks source link

Error: Exception not handled!! when trying to run the changelog command #88

Open rodolfodonahosp opened 5 years ago

rodolfodonahosp commented 5 years ago

I'm trying to use peepdf for the changelog feature, but I can't make it work and would appreciate some help.

I first tried running the program in the interactive console, but when I call the "open" command I get the error:

*** Error: Exception not handled using the interactive console!! Please, report it to the author!! 

And the error.txt file contains:

Traceback (most recent call last):
  File "C:\user\pdf\peepdf2\peepdf.py", line 727, in <module>
    console.cmdloop()
  File "C:\Python27\lib\cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "C:\Python27\lib\cmd.py", line 221, in onecmd
    return func(arg)
  File "C:\user\pdf\peepdf2\PDFConsole.py", line 2858, in do_open
    ret = pdfParser.parse(fileName, forceMode, looseMode)
  File "C:\user\pdf\peepdf2\PDFCore.py", line 7054, in parse
    sys.exit('Error: An error has occurred while parsing an indirect object!!')
SystemExit: Error: An error has occurred while parsing an indirect object!!

Then I tried running the command directly trough parameters:

python.exe "C:\user\pdf\peepdf2\peepdf.py" -C changelog -f "C:\user\pdf\pdf_test.pdf"

But another error occured:

Error: Exception not handled!!

errors.txt:

Traceback (most recent call last):
  File "C:\user\pdf\peepdf2\peepdf.py", line 494, in <module>
    ret, pdf = pdfParser.parse(fileName, options.isForceMode, options.isLooseMode, options.isManualAnalysis)
  File "C:\user\pdf\peepdf2\PDFCore.py", line 7061, in parse
    ret = body.updateObjects()
  File "C:\user\pdf\peepdf2\PDFCore.py", line 4283, in updateObjects
    object.resolveReferences()
  File "C:\user\pdf\peepdf2\PDFCore.py", line 3243, in resolveReferences
    ret = PDFParser.readObject(objectsSection[offset:])
TypeError: slice indices must be integers or None or have an __index__ method

What could be causing those issues?