Skip to content

Getting warning: "annot type '8' has no fill color" on version 1.18.15 but not in 1.18.14 #1152

Closed
@zwitterion

Description

@zwitterion

Please provide all mandatory information!

Describe the bug (mandatory)

I get the warning: warning: annot type '8' has no fill color after calling add_highlight_annot()
This warning only shows in 1.18.15. If I revert to 1.18.14, I don't get the warning.

To Reproduce (mandatory)

Explain the steps to reproduce the behavior, For example, include a minimal code snippet, example files, etc.
import fitz
pdf = fitz.open('some.pdf")
pg = pdf.load_page(0)
ha = page.add_highlight_annot(clip=[0,0,1,1])
ha.set_colors(stroke=clr) # this gives a warning
ha.set_colors(stroke=clr, fill=(1,1,1)) # this also gives a warning
ha.set_colors(stroke=clr, fill=None) # this also gives a warning
....

Expected behavior (optional)

Describe what you expected to happen (if not obvious).
no warning

Screenshots (optional)

If applicable, add screenshots to help explain your problem.

Your configuration (mandatory)

  • Operating system, potentially version and bitness
    3.8.10 (default, May 12 2021, 15:46:43)
    [GCC 8.3.0]
    linux

PyMuPDF 1.18.15: Python bindings for the MuPDF 1.18.0 library.
Version date: 2021-07-10 00:00:01.
Built for Python 3.8 on linux (64-bit).

  • PyMuPDF version, installation method (wheel or generated from source).
    1.18.15 installed via PIP

For example, the output of print(sys.version, "\n", sys.platform, "\n", fitz.__doc__) would be sufficient (for the first two bullets).

Additional context (optional)

Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions