I followed the instructions for the correct installation of / * WeasyPrint * / and I get the error:
OSError: dlopen () failed to load a library: cairo / cairo-2 / cairo-gobject-2
when trying to execute the command: python -m weasyprint http://weasyprint.org weasyprint.pdf
and I can not find in the path C: \ msys32 \ mingw32 \ bin the libpng16-16.dll file.
Properly configure the Pathinstale files as and com shows the instructions.
https://weasyprint.readthedocs.io/en/latest/install.html#windows
Please give me a help, I will be grateful in advance.
Greetings.
What's your Windows version? Is it really a 32bit system?
BTW: Thanks for translating #709, no hablo espanol
Tontyna I have a windows 10 x64 and I have installed Python 3.6.4 x32, which according to the instructions announces: On Windows 32 bit or if you decided to install Python 32 bit on your Windows 64 bit machine you'll have to install the 32-bit GTK + via MSYS2.
Thanks for answering
Of, course, 32bit Applications should and as far as I know do work on 64bit Windows.
Ok. Please open your msys shell, and provide the output of the following command:
pactree mingw-w64-i686-gtk3
(use the mouse and hit Ctrl+Ins to copy the output into the clipboard)
Sorry, forget the pactree output, it's not very informative, instead I'm interested in the output of
pacman -Q
and
pacman -Ql mingw-w64-i686-libpng
Perfect, I'm doing a reinstallation of WeasyPrint ... as soon as I finish doing it I will apply the pacman -Ql mingw-w64-i686-libpng and I will notify you today.
Thanks Tontyna
Tontyna I got the following Error:
/**************************/
C:\Usersrgutierrez.ACTUALNQN>python -m weasyprint http://weasyprint.org weasyprint.pdf
C:\Python3.6\lib\site-packages\weasyprint\fonts.py:41: UserWarning: @font-face is currently not supported on Windows
warnings.warn('@font-face is currently not supported on Windows')
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1207.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:1384.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1561.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:1662.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1763.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:1825.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1888.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:2095.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:2303.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:2364.
WARNING: Ignored transition:background-position .2s ease-out,color .2s ease-in-out at 1:2640, unknown property.
WARNING: Ignored transition-delay:.05s,.1s at 1:2706, unknown property.
WARNING: Ignored width:100vw at 1:3316, invalid value.
WARNING: Ignored transition:border-color .3s ease-in-out,color .3s ease-in-out at 1:3794, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:3856.
WARNING: Ignored transition:background-color .3s ease,border-bottom-color .15s ease,border-left-color .15s ease .15s,border-right-color .15s ease .45s,border-top-color .15s ease .3s,transform .6s ease at 1:4426, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:5087.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:6113.
WARNING: Ignored display:flex at 1:6190, invalid value.
WARNING: Ignored justify-content:center at 1:6203, unknown property.
WARNING: Ignored overflow-x:hidden at 1:6240, unknown property.
WARNING: Ignored display:flex at 1:6584, invalid value.
WARNING: Ignored flex-direction:column at 1:6597, unknown property.
WARNING: Ignored transition:color .25s at 1:6743, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:6949.
WARNING: Ignored align-items:center at 1:7039, unknown property.
WARNING: Ignored display:flex at 1:7058, invalid value.
WARNING: Ignored width:-moz-min-content at 1:7180, invalid value.
WARNING: Ignored width:-webkit-min-content at 1:7203, invalid value.
WARNING: Ignored width:min-content at 1:7229, invalid value.
WARNING: Ignored min-height:60vh at 1:7600, invalid value.
WARNING: Ignored align-content:center at 1:7649, unknown property.
WARNING: Ignored align-items:center at 1:7670, unknown property.
WARNING: Ignored display:flex at 1:7725, invalid value.
WARNING: Ignored flex-wrap:wrap at 1:7738, unknown property.
WARNING: Ignored justify-content:center at 1:7753, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:7969.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:8859.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:9056.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:9241.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:9564.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:9921.
WARNING: Ignored align-items:center at 1:10143, unknown property.
WARNING: Ignored box-shadow:0 0 0 .01em #1ee494 at 1:10230, unknown property.
WARNING: Ignored display:flex at 1:10297, invalid value.
WARNING: Ignored justify-content:space-between at 1:10310, unknown property.
WARNING: Ignored transition:background-color .3s cubic-bezier(.56, .09, .37, 2),box-shadow .3s cubic-bezier(.56, .09, .37, 2) at 1:10367, unknown property.
WARNING: Ignored box-shadow:0 0 0 .65em #19d489 at 1:10690, unknown property.
WARNING: Ignored align-items:flex-start at 1:10759, unknown property.
WARNING: Ignored display:flex at 1:10782, invalid value.
WARNING: Ignored flex-wrap:wrap at 1:10795, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:10825.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:10928.
WARNING: Ignored flex:1 8em at 1:11091, unknown property.
WARNING: Ignored transition:color .75s at 1:11102, unknown property.
WARNING: Ignored background-position-y:0 at 1:11514, unknown property.
WARNING: Ignored transition:background-position .75s ease at 1:11563, unknown property.
WARNING: Ignored left:calc(-.8em - .35em / 2) at 1:11729, invalid value.
WARNING: Ignored transition:border-bottom-color .15s ease,border-left-color .15s ease .15s,border-right-color .15s ease .45s,border-top-color .15s ease .3s,transform .6s ease at 1:11758, unknown property.
WARNING: Ignored background-position-y:100% at 1:12054, unknown property.
WARNING: Ignored max-width:calc(100% + 45px * 2 + 2px) at 1:12306, invalid value.
WARNING: Ignored box-shadow:0 1px 0 at 1:12433, unknown property.
WARNING: Ignored -webkit-column-break-inside:avoid at 1:12715, unknown property.
WARNING: Ignored align-items:flex-start at 1:12783, unknown property.
WARNING: Ignored display:flex at 1:12806, invalid value.
WARNING: Ignored align-items:center at 1:13109, unknown property.
WARNING: Ignored display:flex at 1:13128, invalid value.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:13795.
WARNING: Ignored align-content:flex-start at 1:14199, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:14241.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:14333.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:15003.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:15114.
WARNING: Ignored align-items:center at 1:15269, unknown property.
WARNING: Ignored cursor:pointer at 1:15424, the property does not apply for the print media.
WARNING: Ignored display:flex at 1:15439, invalid value.
WARNING: Ignored transition:opacity .4s at 1:15503, unknown property.
WARNING: Ignored cursor:pointer at 1:15622, the property does not apply for the print media.
WARNING: Ignored transition:color .2s ease .2s,height .25s ease,padding .25s ease at 1:15662, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:16283.
WARNING: Ignored cursor:pointer at 1:16492, the property does not apply for the print media.
WARNING: Ignored transition:background-color .25s ease,left .25s ease .05s,padding .25s ease,right .25s ease,transform .2s ease at 1:17056, unknown property.
WARNING: Ignored box-shadow:0 5px 5px 0 rgba(111,122,137,0.3) at 1:17514, unknown property.
WARNING: Ignored align-items:center at 1:17599, unknown property.
WARNING: Ignored box-shadow:0 0 0 0 #e2e4e8 at 1:17618, unknown property.
WARNING: Ignored display:flex at 1:17667, invalid value.
WARNING: Ignored transition:box-shadow .2s ease,opacity .2s ease at 1:17710, unknown property.
WARNING: Ignored animation:switch-fade-in 1s ease 1s both,color-fade-to-primary .25s ease 2.25s both at 1:17813, unknown property.
WARNING: Ignored background-position-x:0 at 1:18061, unknown property.
WARNING: Ignored justify-content:flex-end at 1:18099, unknown property.
WARNING: Ignored animation:opacity-fade-in 1s ease 1.6s both at 1:18291, unknown property.
WARNING: Ignored animation:opacity-fade-in .25s ease-in-out 1.85s both at 1:18484, unknown property.
WARNING: Ignored box-shadow:0 5px 5px 0 rgba(111,122,137,0.1) at 1:18563, unknown property.
WARNING: Ignored transition:box-shadow .2s,transform .2s ease at 1:18608, unknown property.
WARNING: Ignored animation:opacity-fade-in .25s ease-in-out 2s both at 1:18726, unknown property.
WARNING: Ignored transition:background-color .25s ease,left .25s ease,padding .25s ease,right .25s ease .05s,transform .2s ease at 1:18879, unknown property.
WARNING: Ignored animation:color-fade-to-grey .25s ease 2.25s both at 1:19055, unknown property.
WARNING: Ignored justify-content:flex-start at 1:19137, unknown property.
WARNING: Ignored background-position-x:0 at 1:19398, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:19467.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:19575.
WARNING: Ignored transition:background-position .25s ease,opacity .25s ease at 1:20046, unknown property.
WARNING: Ignored transition:opacity .25s ease,top .25s ease at 1:20724, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:20767.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:20960.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:21184.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:21859.
WARNING: Ignored animation:vertical-page-border-fade-in 1.5s ease both 2s at 1:22201, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both at 1:22308, unknown property.
WARNING: Ignored animation-delay:2575ms at 1:22417, unknown property.
WARNING: Ignored animation-delay:2650ms at 1:22505, unknown property.
WARNING: Ignored animation-delay:2725ms at 1:22593, unknown property.
WARNING: Ignored animation-delay:2800ms at 1:22681, unknown property.
WARNING: Ignored animation-delay:2875ms at 1:22769, unknown property.
WARNING: Ignored animation-delay:2950ms at 1:22857, unknown property.
WARNING: Ignored animation:color-fade-to-action .5s ease both 4.5s at 1:22941, unknown property.
WARNING: Ignored animation-delay:4.5s,6.5s at 1:23054, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both 2.5s at 1:23141, unknown property.
WARNING: Ignored animation:opacity-fade-in .75s ease both 2.5s at 1:23260, unknown property.
WARNING: Ignored animation:horizontal-page-border-fade-in 1s ease both 1s at 1:23399, unknown property.
WARNING: Ignored animation:header-height-fade-in .5s ease-in both 3s at 1:23524, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both 3s at 1:23647, unknown property.
WARNING: Ignored animation:opacity-fade-in .75s ease both .25s at 1:23773, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both 3s at 1:23889, unknown property.
WARNING: Ignored animation:color-fade-to-action .5s ease both 3s at 1:24013, unknown property.
WARNING: Ignored animation:opacity-fade-in .5s ease both 3.2s at 1:24203, unknown property.
WARNING: Ignored animation:start-list-fade-in 1s ease both 3s at 1:24319, unknown property.
WARNING: Ignored animation-delay:4.5s at 1:24438, unknown property.
WARNING: Ignored animation-delay:5s at 1:24652, unknown property.
WARNING: Ignored display:flex at 1:24678, invalid value.
WARNING: Ignored align-self:flex-end at 1:24992, unknown property.
WARNING: Ignored align-items:center at 1:25012, unknown property.
WARNING: Ignored display:flex at 1:25083, invalid value.
WARNING: Ignored transition:border .2s ease at 1:25152, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside:hover progress::-moz-progress-bar', Unknown pseudo-element: -moz-progress-bar
WARNING: Invalid or unsupported selector 'aside+aside:hover progress::-webkit-progress-value', Unknown pseudo-element: -webkit-progress-value
WARNING: Ignored transition:margin-top .25s ease at 1:25627, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside progress::-webkit-progress-bar', Unknown pseudo-element: -webkit-progress-bar
WARNING: Ignored transition:background-color .25s ease at 1:26149, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside progress::-moz-progress-bar', Unknown pseudo-element: -moz-progress-bar
WARNING: Ignored transition:background-color .25s ease at 1:26278, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside progress::-webkit-progress-value', Unknown pseudo-element: -webkit-progress-value
WARNING: Expected a media type, got screen//and//(min-width: 831px)
WARNING: Invalid media type " screen and (min-width: 831px)" the whole @media rule was ignored at 1:26316.
WARNING: Expected a media type, got screen//and//(max-width: 830px)
WARNING: Invalid media type " screen and (max-width: 830px)" the whole @media rule was ignored at 1:26531.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:31657.
WARNING: Ignored display:flex at 1:32705, invalid value.
WARNING: Ignored flex-direction:column at 1:32718, unknown property.
WARNING: Ignored justify-content:center at 1:32740, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:32797.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:32925.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:33084.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:33185.
WARNING: Ignored display:flex at 1:33572, invalid value.
WARNING: Ignored flex-wrap:wrap at 1:33585, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:34145.
WARNING: Ignored align-items:stretch at 1:34281, unknown property.
WARNING: Ignored display:flex at 1:34301, invalid value.
WARNING: Ignored flex-wrap:wrap at 1:34314, unknown property.
WARNING: Ignored flex:1 10em at 1:34414, unknown property.
WARNING: Ignored align-content:center at 1:34597, unknown property.
WARNING: Ignored align-items:center at 1:34618, unknown property.
WARNING: Ignored background-position-y:100% at 1:34637, unknown property.
WARNING: Ignored display:flex at 1:34737, invalid value.
WARNING: Ignored flex:1 10em at 1:34750, unknown property.
WARNING: Ignored flex-wrap:wrap at 1:34762, unknown property.
WARNING: Ignored justify-content:center at 1:34777, unknown property.
WARNING: Ignored transition:border-color .2s at 1:34814, unknown property.
WARNING: Ignored vertical-align:center at 1:34878, invalid value.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:35237.
WARNING: Ignored height:100vh at 1:35369, invalid value.
WARNING: Ignored transition:height 500ms 500ms at 1:35584, unknown property.
WARNING: Ignored transition:opacity 500ms 500ms at 1:35790, unknown property.
WARNING: Ignored animation-duration:1s at 1:35875, unknown property.
WARNING: Ignored animation-fill-mode:both at 1:35897, unknown property.
WARNING: Ignored animation-name:start-list-fade-in at 1:35922, unknown property.
WARNING: Ignored animation-timing-function:ease at 1:35956, unknown property.
WARNING: Ignored animation:typing 2000ms steps(35, end) 500ms both,cursor 2000ms step-end infinite 3000ms at 1:36053, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 831px)
WARNING: Invalid media type " screen and (min-width: 831px)" the whole @media rule was ignored at 1:36142.
_cairo_win32_scaled_font_set_metrics:GetTextMetrics: La operaci戮n se complet戮 correctamente.
(python.exe:25428): Pango-WARNING **: 18:51:56.477: failed to create cairo scaled font, expect ugly output. the offending font is 'Tahoma 0'
(python.exe:25428): Pango-WARNING **: 18:51:56.502: font_face status is: error occurred in the Windows Graphics Device Interface
(python.exe:25428): Pango-WARNING **: 18:51:56.505: scaled_font status is: error occurred in the Windows Graphics Device Interface
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 266, in draw_stacking_context
enable_hinting)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 990, in draw_inline_level
draw_text(context, child, enable_hinting)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 1009, in draw_text
context.move_to(textbox.position_x, textbox.position_y + textbox.baseline)
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 938, in move_to
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 274, in draw_stacking_context
draw_stacking_context(context, child_context, enable_hinting)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 270, in draw_stacking_context
draw_stacking_context(context, child_context, enable_hinting)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 281, in draw_stacking_context
context.paint_with_alpha(box.style.opacity)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 274, in draw_stacking_context
draw_stacking_context(context, child_context, enable_hinting)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 270, in draw_stacking_context
draw_stacking_context(context, child_context, enable_hinting)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 281, in draw_stacking_context
context.paint_with_alpha(box.style.opacity)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 274, in draw_stacking_context
draw_stacking_context(context, child_context, enable_hinting)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\document.py", line 238, in paint
draw_page(self._page_box, cairo_context, self._enable_hinting)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 162, in draw_page
draw_stacking_context(context, stacking_context, enable_hinting)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 281, in draw_stacking_context
context.paint_with_alpha(box.style.opacity)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 91, in stacked
yield
File "C:\Python3.6\lib\site-packages\weasyprint\document.py", line 502, in write_pdf
page.paint(context, scale=scale)
File "C:\Python3.6\lib\site-packages\weasyprint\document.py", line 238, in paint
draw_page(self._page_box, cairo_context, self._enable_hinting)
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python3.6\librunpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python3.6\librunpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python3.6\lib\site-packages\weasyprint__main__.py", line 181, in
main()
File "C:\Python3.6\lib\site-packages\weasyprint__main__.py", line 177, in main
getattr(html, 'write_' + format_)(output, **kwargs)
File "C:\Python3.6\lib\site-packages\weasyprint__init__.py", line 183, in write_pdf
target, zoom, attachments)
File "C:\Python3.6\lib\site-packages\weasyprint\document.py", line 503, in write_pdf
surface.show_page()
File "C:\Python3.6\libcontextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python3.6\lib\site-packages\weasyprint\draw.py", line 93, in stacked
context.restore()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 178, in restore
self._check_status()
File "C:\Python3.6\lib\site-packages\cairocfficontext.py", line 108, in _check_status
_check_status(cairo.cairo_status(self._pointer))
File "C:\Python3.6\lib\site-packages\cairocffi__init__.py", line 79, in _check_status
raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'
/**************************/
$ pacman -Ql mingw-w64-i686-libpng
mingw-w64-i686-libpng /mingw32/
mingw-w64-i686-libpng /mingw32/bin/
mingw-w64-i686-libpng /mingw32/bin/libpng-config
mingw-w64-i686-libpng /mingw32/bin/libpng16-16.dll
mingw-w64-i686-libpng /mingw32/bin/libpng16-config
mingw-w64-i686-libpng /mingw32/bin/png-fix-itxt.exe
mingw-w64-i686-libpng /mingw32/bin/pngfix.exe
mingw-w64-i686-libpng /mingw32/include/
mingw-w64-i686-libpng /mingw32/include/libpng16/
mingw-w64-i686-libpng /mingw32/include/libpng16/png.h
mingw-w64-i686-libpng /mingw32/include/libpng16/pngconf.h
mingw-w64-i686-libpng /mingw32/include/libpng16/pnglibconf.h
mingw-w64-i686-libpng /mingw32/include/png.h
mingw-w64-i686-libpng /mingw32/include/pngconf.h
mingw-w64-i686-libpng /mingw32/include/pnglibconf.h
mingw-w64-i686-libpng /mingw32/lib/
mingw-w64-i686-libpng /mingw32/lib/libpng.a
mingw-w64-i686-libpng /mingw32/lib/libpng.dll.a
mingw-w64-i686-libpng /mingw32/lib/libpng16.a
mingw-w64-i686-libpng /mingw32/lib/libpng16.dll.a
mingw-w64-i686-libpng /mingw32/lib/pkgconfig/
mingw-w64-i686-libpng /mingw32/lib/pkgconfig/libpng.pc
mingw-w64-i686-libpng /mingw32/lib/pkgconfig/libpng16.pc
mingw-w64-i686-libpng /mingw32/share/
mingw-w64-i686-libpng /mingw32/share/licenses/
mingw-w64-i686-libpng /mingw32/share/licenses/libpng/
mingw-w64-i686-libpng /mingw32/share/licenses/libpng/LICENSE
mingw-w64-i686-libpng /mingw32/share/man/
mingw-w64-i686-libpng /mingw32/share/man/man3/
mingw-w64-i686-libpng /mingw32/share/man/man3/libpng.3.gz
mingw-w64-i686-libpng /mingw32/share/man/man3/libpngpf.3.gz
mingw-w64-i686-libpng /mingw32/share/man/man5/
mingw-w64-i686-libpng /mingw32/share/man/man5/png.5.gz
Your Mingw32 looks ok to me.
The WeasyPrint crashing errors sound familiar to me -- I used to get them before the @font-face support for Windows was introduced, especially when pytesting...
Is it possible for you to switch to the current WeasyPrint release candidate v43rc1?
@robertonqn you definitely should switch to v43rc1. Or at least dont try to render weasyprint.org, this website is sprinkled with fancy stuff... simpler HTML will probably work.
@liZe - it's not a Win32bit issue, it's a problem with the new and shiny website. It cannot be rendered with the current 0.42.3, my 64bit system crashes with CAIRO_STATUS_WIN32_GDI_ERROR, too.
Tontyna You can help me to update to the new version 43rc1. I'm looking for some instructions but I can not find it.
Greetings.
Download and extract the zip archive
<path-to-python>\Lib\site-packages\weasyprint\ folder (e.g. to keep.weasyprint)<path-to-python>\Lib\site-packages\WeasyPrint-0.42.3.dist-info\ folder (eg, keep.WeasyPrint-0.42.3.dist-info)<extracted-zip>\WeasyPrint-43rc1\weasyprint folder into your <path-to-python>\Lib\site-packages\Thats a bit brute-force, but its quick & simple.
When in the near future the latest version becomes available via pip you can safely delete the weasyprint folder, undo the renames and pip intsall weasyprint again.
Tontyna thank you very much, I do not get any error when compiling my project, it just shows me:
/***********************/
C:\Usersrgutierrez.ACTUALNQN>python -m weasyprint http://weasyprint.org weasyprint.pdf
WARNING: Failed to load local font "Rosario Italic"
WARNING: Failed to load local font "Rosario-Italic"
WARNING: Failed to load local font "Rosario"
WARNING: Failed to load local font "Rosario-Regular"
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1207.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:1384.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1561.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:1662.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1763.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:1825.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:1888.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:2095.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:2303.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:2364.
WARNING: Ignored transition:background-position .2s ease-out,color .2s ease-in-out at 1:2640, unknown property.
WARNING: Ignored transition-delay:.05s,.1s at 1:2706, unknown property.
WARNING: Ignored width:100vw at 1:3316, invalid value.
WARNING: Ignored transition:border-color .3s ease-in-out,color .3s ease-in-out at 1:3794, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:3856.
WARNING: Ignored transition:background-color .3s ease,border-bottom-color .15s ease,border-left-color .15s ease .15s,border-right-color .15s ease .45s,border-top-color .15s ease .3s,transform .6s ease at 1:4426, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:5087.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:6113.
WARNING: Ignored overflow-x:hidden at 1:6240, unknown property.
WARNING: Ignored transition:color .25s at 1:6743, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:6949.
WARNING: Ignored width:-moz-min-content at 1:7180, invalid value.
WARNING: Ignored width:-webkit-min-content at 1:7203, invalid value.
WARNING: Ignored width:min-content at 1:7229, invalid value.
WARNING: Ignored min-height:60vh at 1:7600, invalid value.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:7969.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:8859.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:9056.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:9241.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:9564.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:9921.
WARNING: Ignored box-shadow:0 0 0 .01em #1ee494 at 1:10230, unknown property.
WARNING: Ignored transition:background-color .3s cubic-bezier(.56, .09, .37, 2),box-shadow .3s cubic-bezier(.56, .09, .37, 2) at 1:10367, unknown property.
WARNING: Ignored box-shadow:0 0 0 .65em #19d489 at 1:10690, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:10825.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:10928.
WARNING: Ignored transition:color .75s at 1:11102, unknown property.
WARNING: Ignored background-position-y:0 at 1:11514, unknown property.
WARNING: Ignored transition:background-position .75s ease at 1:11563, unknown property.
WARNING: Ignored left:calc(-.8em - .35em / 2) at 1:11729, invalid value.
WARNING: Ignored transition:border-bottom-color .15s ease,border-left-color .15s ease .15s,border-right-color .15s ease .45s,border-top-color .15s ease .3s,transform .6s ease at 1:11758, unknown property.
WARNING: Ignored background-position-y:100% at 1:12054, unknown property.
WARNING: Ignored max-width:calc(100% + 45px * 2 + 2px) at 1:12306, invalid value.
WARNING: Ignored box-shadow:0 1px 0 at 1:12433, unknown property.
WARNING: Ignored -webkit-column-break-inside:avoid at 1:12715, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:13795.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:14241.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:14333.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:15003.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:15114.
WARNING: Ignored cursor:pointer at 1:15424, the property does not apply for the print media.
WARNING: Ignored transition:opacity .4s at 1:15503, unknown property.
WARNING: Ignored cursor:pointer at 1:15622, the property does not apply for the print media.
WARNING: Ignored transition:color .2s ease .2s,height .25s ease,padding .25s ease at 1:15662, unknown property.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:16283.
WARNING: Ignored cursor:pointer at 1:16492, the property does not apply for the print media.
WARNING: Ignored transition:background-color .25s ease,left .25s ease .05s,padding .25s ease,right .25s ease,transform .2s ease at 1:17056, unknown property.
WARNING: Ignored box-shadow:0 5px 5px 0 rgba(111,122,137,0.3) at 1:17514, unknown property.
WARNING: Ignored box-shadow:0 0 0 0 #e2e4e8 at 1:17618, unknown property.
WARNING: Ignored transition:box-shadow .2s ease,opacity .2s ease at 1:17710, unknown property.
WARNING: Ignored animation:switch-fade-in 1s ease 1s both,color-fade-to-primary .25s ease 2.25s both at 1:17813, unknown property.
WARNING: Ignored background-position-x:0 at 1:18061, unknown property.
WARNING: Ignored animation:opacity-fade-in 1s ease 1.6s both at 1:18291, unknown property.
WARNING: Ignored animation:opacity-fade-in .25s ease-in-out 1.85s both at 1:18484, unknown property.
WARNING: Ignored box-shadow:0 5px 5px 0 rgba(111,122,137,0.1) at 1:18563, unknown property.
WARNING: Ignored transition:box-shadow .2s,transform .2s ease at 1:18608, unknown property.
WARNING: Ignored animation:opacity-fade-in .25s ease-in-out 2s both at 1:18726, unknown property.
WARNING: Ignored transition:background-color .25s ease,left .25s ease,padding .25s ease,right .25s ease .05s,transform .2s ease at 1:18879, unknown property.
WARNING: Ignored animation:color-fade-to-grey .25s ease 2.25s both at 1:19055, unknown property.
WARNING: Ignored background-position-x:0 at 1:19398, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:19467.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:19575.
WARNING: Ignored transition:background-position .25s ease,opacity .25s ease at 1:20046, unknown property.
WARNING: Ignored transition:opacity .25s ease,top .25s ease at 1:20724, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:20767.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:20960.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:21184.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:21859.
WARNING: Ignored animation:vertical-page-border-fade-in 1.5s ease both 2s at 1:22201, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both at 1:22308, unknown property.
WARNING: Ignored animation-delay:2575ms at 1:22417, unknown property.
WARNING: Ignored animation-delay:2650ms at 1:22505, unknown property.
WARNING: Ignored animation-delay:2725ms at 1:22593, unknown property.
WARNING: Ignored animation-delay:2800ms at 1:22681, unknown property.
WARNING: Ignored animation-delay:2875ms at 1:22769, unknown property.
WARNING: Ignored animation-delay:2950ms at 1:22857, unknown property.
WARNING: Ignored animation:color-fade-to-action .5s ease both 4.5s at 1:22941, unknown property.
WARNING: Ignored animation-delay:4.5s,6.5s at 1:23054, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both 2.5s at 1:23141, unknown property.
WARNING: Ignored animation:opacity-fade-in .75s ease both 2.5s at 1:23260, unknown property.
WARNING: Ignored animation:horizontal-page-border-fade-in 1s ease both 1s at 1:23399, unknown property.
WARNING: Ignored animation:header-height-fade-in .5s ease-in both 3s at 1:23524, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both 3s at 1:23647, unknown property.
WARNING: Ignored animation:opacity-fade-in .75s ease both .25s at 1:23773, unknown property.
WARNING: Ignored animation:color-fade-to-light .5s ease both 3s at 1:23889, unknown property.
WARNING: Ignored animation:color-fade-to-action .5s ease both 3s at 1:24013, unknown property.
WARNING: Ignored animation:opacity-fade-in .5s ease both 3.2s at 1:24203, unknown property.
WARNING: Ignored animation:start-list-fade-in 1s ease both 3s at 1:24319, unknown property.
WARNING: Ignored animation-delay:4.5s at 1:24438, unknown property.
WARNING: Ignored animation-delay:5s at 1:24652, unknown property.
WARNING: Ignored transition:border .2s ease at 1:25152, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside:hover progress::-moz-progress-bar', Unknown pseudo-element: -moz-progress-bar
WARNING: Invalid or unsupported selector 'aside+aside:hover progress::-webkit-progress-value', Unknown pseudo-element: -webkit-progress-value
WARNING: Ignored transition:margin-top .25s ease at 1:25627, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside progress::-webkit-progress-bar', Unknown pseudo-element: -webkit-progress-bar
WARNING: Ignored transition:background-color .25s ease at 1:26149, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside progress::-moz-progress-bar', Unknown pseudo-element: -moz-progress-bar
WARNING: Ignored transition:background-color .25s ease at 1:26278, unknown property.
WARNING: Invalid or unsupported selector 'aside+aside progress::-webkit-progress-value', Unknown pseudo-element: -webkit-progress-value
WARNING: Expected a media type, got screen//and//(min-width: 831px)
WARNING: Invalid media type " screen and (min-width: 831px)" the whole @media rule was ignored at 1:26316.
WARNING: Expected a media type, got screen//and//(max-width: 830px)
WARNING: Invalid media type " screen and (max-width: 830px)" the whole @media rule was ignored at 1:26531.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:31657.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:32797.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:32925.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:33084.
WARNING: Expected a media type, got screen//and//(min-width: 581px)
WARNING: Invalid media type " screen and (min-width: 581px)" the whole @media rule was ignored at 1:33185.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:34145.
WARNING: Ignored background-position-y:100% at 1:34637, unknown property.
WARNING: Ignored transition:border-color .2s at 1:34814, unknown property.
WARNING: Ignored vertical-align:center at 1:34878, invalid value.
WARNING: Expected a media type, got screen//and//(max-width: 580px)
WARNING: Invalid media type " screen and (max-width: 580px)" the whole @media rule was ignored at 1:35237.
WARNING: Ignored height:100vh at 1:35369, invalid value.
WARNING: Ignored transition:height 500ms 500ms at 1:35584, unknown property.
WARNING: Ignored transition:opacity 500ms 500ms at 1:35790, unknown property.
WARNING: Ignored animation-duration:1s at 1:35875, unknown property.
WARNING: Ignored animation-fill-mode:both at 1:35897, unknown property.
WARNING: Ignored animation-name:start-list-fade-in at 1:35922, unknown property.
WARNING: Ignored animation-timing-function:ease at 1:35956, unknown property.
WARNING: Ignored animation:typing 2000ms steps(35, end) 500ms both,cursor 2000ms step-end infinite 3000ms at 1:36053, unknown property.
WARNING: Expected a media type, got screen//and//(min-width: 831px)
WARNING: Invalid media type " screen and (min-width: 831px)" the whole @media rule was ignored at 1:36142.
/*********************************/
I get that because I run the command: python -m weasyprint http://weasyprint.org weasyprint.pdf.
but my project no longer throws me any error of the above named. thank you again.
Those are expected WARNINGS (not ERRORS) -- reason is the bunch of fancy stuff not yet implemented by WeasyPrint stuffed into the redesigned homepage. The fancy stuff's main purpose is to make developers happy -- there is still plenty to do for them, no danger of becoming obsolete :smirk:
Excellent ... thanks for all your answers.
Greetings.
Just discovered: v43rc1 is available on PyPi and can be installed with pip:
pip install weasyprint==43rc1
perfect, now I install it. Thank you.
Tontyna can you help me with the following: context must be a dict rather than RequestContext.
This is my Code in the views.py:
from weasyprint import HTML, CSS
from django.template.loader import get_template
def pdf_generation (request):
html_template = get_template ('templates / invoice.html')
user = request.user
rendered_html = html_template.render (RequestContext (request, {'you': user})). encode (encoding = "UTF-8")
pdf_file = HTML (string = rendered_html) .write_pdf (stylesheets = [CSS (settings.STATIC_ROOT + 'css / report.css')])
http_response = HttpResponse (pdf_file, content_type = 'application / pdf')
http_response ['Content-Disposition'] = 'filename = "invoice.pdf"'
return response
@robertonqn -- please dont mix this (solved) installation issue with your PDF generating issue #714
BTW: The stylesheets parameter of write_pdf() should -- in your case -- contain the filename, like so:
...write_pdf (stylesheets = [settings.STATIC_ROOT + 'css/report.css'])
That is to say: remove the CSS() unless you provide a css-string, like e.g. body{color:red}
Thanks to everyone for the help in this case.
Nose how to solve this Case.
Regards,
Most helpful comment
Those are expected WARNINGS (not ERRORS) -- reason is the bunch of fancy stuff not yet implemented by WeasyPrint stuffed into the redesigned homepage. The fancy stuff's main purpose is to make developers happy -- there is still plenty to do for them, no danger of becoming obsolete :smirk: