Description of the bug
When reading annotations from a PDF page, we sometimes need the next attribute of Annot. However, when using this attribute, the following message appears in the terminal:
No attribute .parent: type(self)=<class 'fitz.Annot'> id(self)=139712888949840: have set id(self.parent)=139712932742416.
This occurs in version 1.23.21, but not in version 1.22.5.
The object itself seems to be accessible.
How to reproduce the bug
Using the following code returns the warning above when running it:
import fitz
doc = fitz.open()
page = doc.new_page()
page.add_line_annot((0, 0), (1, 1))
page.add_line_annot((1, 0), (0, 1))
first_annot, _ = page.annots()
first_annot.next.type
PyMuPDF version
1.23.21
Operating system
Linux
Python version
3.11
Description of the bug
When reading annotations from a PDF page, we sometimes need the
nextattribute ofAnnot. However, when using this attribute, the following message appears in the terminal:This occurs in version
1.23.21, but not in version1.22.5.The object itself seems to be accessible.
How to reproduce the bug
Using the following code returns the warning above when running it:
PyMuPDF version
1.23.21
Operating system
Linux
Python version
3.11