Description
!136 implemented redaction of annotations, but it fails on the sample PDF file from https://github.com/py-pdf/sample-files/tree/main/024-annotations because of an AttributeError:
/usr/lib/python3.14/site-packages/pymupdf/__init__.py in ?(self, name, xref)
10219 if xref == 0:
10220 annot = JM_get_annot_by_name(page, name)
10221 else:
10222 annot = JM_get_annot_by_xref(page, xref)
> 10223 if annot.m_internal:
10224 return Annot(annot)
AttributeError: 'NoneType' object has no attribute 'm_internal'
Related upstream issue
## Description
!136 implemented redaction of annotations, but it fails on the sample PDF file from https://github.com/py-pdf/sample-files/tree/main/024-annotations because of an `AttributeError`:
```py
/usr/lib/python3.14/site-packages/pymupdf/__init__.py in ?(self, name, xref)
10219 if xref == 0:
10220 annot = JM_get_annot_by_name(page, name)
10221 else:
10222 annot = JM_get_annot_by_xref(page, xref)
> 10223 if annot.m_internal:
10224 return Annot(annot)
AttributeError: 'NoneType' object has no attribute 'm_internal'
```
## Related upstream issue
https://github.com/pymupdf/PyMuPDF/issues/4928