Skip to content

Fix DictionaryObject.__init__()#67

Merged
claird merged 1 commit intoclaird:masterfrom
silanai:master
Jun 21, 2020
Merged

Fix DictionaryObject.__init__()#67
claird merged 1 commit intoclaird:masterfrom
silanai:master

Conversation

@silanai
Copy link
Copy Markdown

@silanai silanai commented Apr 7, 2020

Adding bookmarks with PdfFileWriter.addBookmark crashes the program and provides the following error.

Traceback (most recent call last):
  File "basic_features.py", line 110, in <module>
    main()
  File "basic_features.py", line 73, in main
    writer.addBookmark("test", 1)
  File "PyPDF4/pypdf/pdf.py", line 824, in addBookmark
    outlineRef = self.getOutlineRoot()
  File "PyPDF4/pypdf/pdf.py", line 703, in getOutlineRoot
    outline = TreeObject()
  File "PyPDF4/pypdf/generic.py", line 737, in __init__
    DictionaryObject.__init__()
TypeError: descriptor '__init__' of 'dict' object needs an argument

@claird claird merged commit 23412b6 into claird:master Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants