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

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

Closed
zwitterion opened this issue Jul 16, 2021 · 2 comments
Assignees
Labels

Comments

@zwitterion
Copy link

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.

@JorjMcKie
Copy link
Collaborator

JorjMcKie commented Jul 17, 2021

Forgot to check a condition. Will be fixed in next version.
BTW: this is misplaced message only - it has no functional impact whatsoever.

@JorjMcKie
Copy link
Collaborator

New vesion 1.18.16 uploaded to PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants