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

v57.0 throws OSError: cannot write mode CMYK as PNG #1758

Closed
mgu opened this issue Oct 29, 2022 · 2 comments
Closed

v57.0 throws OSError: cannot write mode CMYK as PNG #1758

mgu opened this issue Oct 29, 2022 · 2 comments
Labels
crash Problems preventing documents from being rendered

Comments

@mgu
Copy link

mgu commented Oct 29, 2022

from weasyprint import HTML

with open("test.html", "r") as f:
    html_data = f.read()

html = HTML(string=html_data, base_url="")
html.write_pdf()
<html>
	<head>
	</head>
	<body>
		<img src="https://upload.wikimedia.org/wikipedia/en/2/25/Channel_digital_image_CMYK_color.jpg" />
	</body>
</html>

This code works on v56.1 and master branch, but fails on v57.0

pip freeze output:

Brotli==1.0.9
cairocffi==1.4.0
CairoSVG==2.5.2
cffi==1.15.1
cssselect2==0.7.0
defusedxml==0.7.1
fonttools==4.38.0
html5lib==1.1
pdfrw==0.4
Pillow==9.2.0
pycparser==2.21
pydyf==0.5.0
pyphen==0.13.0
six==1.16.0
tinycss2==1.2.1
-e git+ssh://git@github.com/Kozea/WeasyPrint.git@3c6ac5ec4b720d50b5a371a03d42ca3499829126#egg=weasyprint
webencodings==0.5.1
zopfli==0.2.1
@liZe liZe added the crash Problems preventing documents from being rendered label Oct 29, 2022
@liZe
Copy link
Member

liZe commented Oct 29, 2022

Hi!

Thanks for the report.

It’s actually a duplicate of #1755, it’s already fixed!

@liZe liZe closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2022
@liZe
Copy link
Member

liZe commented Oct 29, 2022

(Note that the colors are broken because CMYK is not supported, that’s another problem discussed in #1091.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Problems preventing documents from being rendered
Projects
None yet
Development

No branches or pull requests

2 participants