Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DictionaryObject.__init__() #67

Merged
merged 1 commit into from
Jun 21, 2020
Merged

Fix DictionaryObject.__init__() #67

merged 1 commit into from
Jun 21, 2020

Conversation

birdisword
Copy link

@birdisword birdisword 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