Skip to content

Exception: Missing /Root element #96

Description

@shwetankarora

I have run peepdf on a file using the following command on mac:

peepdf <filepath>

and got the following error in file .peepdf-error.txt:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/peepdf/PDFCore.py", line 7705, in createPDFTrailer
    trailer = PDFTrailer(dict, lastXrefSection, streamPresent=streamPresent)
  File "/usr/local/lib/python3.8/site-packages/peepdf/PDFCore.py", line 4474, in __init__
    raise Exception(ret[1])
Exception: Missing /Root element

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/peepdf/main.py", line 409, in main
    ret, pdf = pdfParser.parse(fileName, options.isForceMode, options.isLooseMode, options.isManualAnalysis)
  File "/usr/local/lib/python3.8/site-packages/peepdf/PDFCore.py", line 7153, in parse
    ret = self.createPDFTrailer(trailerContent, trailerOffset)
  File "/usr/local/lib/python3.8/site-packages/peepdf/PDFCore.py", line 7708, in createPDFTrailer
    if e.message != '':
AttributeError: 'Exception' object has no attribute 'message'

On the command line, I get the following error:

*** Error: Exception not handled!!


Please, don't forget to report errors if found:

	- Sending the file "/Users/shwetankarora/.peepdf-error.txt" to the author (mailto:peepdfREMOVETHIS@eternal-todo.com)
	- And/Or creating an issue on the project webpage (https://github.com/jesparza/peepdf/issues)

What could be the cause of this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions