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

Parse Error #326

Closed
Jarch09 opened this issue Jun 18, 2016 · 2 comments
Closed

Parse Error #326

Jarch09 opened this issue Jun 18, 2016 · 2 comments
Labels
documentation Problems or improvements needed on the documentation or on the website

Comments

@Jarch09
Copy link

Jarch09 commented Jun 18, 2016

testw.pdf

To run a test, I ran

from weasyprint import HTML
a = 'http://weasyprint.readthedocs.io/en/latest/hacking.html'
HTML(a).write_pdf('testw.pdf')

I got the following stdout:
Ignored -webkit-box-sizing: border-box at 1:3, unknown property.
Ignored -moz-box-sizing: border-box at 1:33, unknown property.
Ignored -webkit-box-sizing: border-box at 1:292, unknown property.
Ignored -moz-box-sizing: border-box at 1:322, unknown property.
Ignored -webkit-text-size-adjust: 100% at 1:391, unknown property.
Ignored -ms-text-size-adjust: 100% at 1:421, unknown property.
Ignored _font-family: "courier new",monospace at 1:792, unknown property.
Ignored quotes: none at 1:865, invalid value.
Ignored -ms-interpolation-mode: bicubic at 1:1160, unknown property.
Ignored cursor: pointer at 1:1332, the property does not apply for the print media.
Ignored cursor: pointer at 1:1611, the property does not apply for the print media.
Ignored -webkit-appearance: button at 1:1626, unknown property.
Ignored cursor: default at 1:1703, the property does not apply for the print media.
Ignored -webkit-appearance: textfield at 1:1839, unknown property.
Ignored -moz-box-sizing: content-box at 1:1868, unknown property.
Ignored -webkit-box-sizing: content-box at 1:1896, unknown property.
Ignored -webkit-appearance: none at 1:2049, unknown property.
Invalid or unsupported selector 'button::-moz-focus-inner,input::-moz-focus-inner', Unknown pseudo-element: -moz-focus-inner
Ignored resize: vertical at 1:2183, unknown property.
Ignored clip: rect(0 0 0 0) at 1:2599, invalid value.
Ignored box-shadow: none at 1:2977, unknown property.
Ignored text-shadow: none at 1:3004, unknown property.
Ignored filter: none at 1:3032, unknown property.
Ignored -ms-filter: none at 1:3055, unknown property.
Ignored -webkit-font-smoothing: antialiased at 1:5091, unknown property.
Ignored text-rendering: auto at 4:1012, unknown property.
Ignored -webkit-font-smoothing: antialiased at 4:1032, unknown property.
Ignored -moz-osx-font-smoothing: grayscale at 4:1067, unknown property.
Ignored -webkit-animation: fa-spin 2s infinite linear at 4:3007, unknown property.
Ignored animation: fa-spin 2s infinite linear at 4:3052, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1) at 4:3391, unknown property.
Ignored -webkit-transform: rotate(90deg) at 4:3455, unknown property.
Ignored -ms-transform: rotate(90deg) at 4:3487, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2) at 4:3554, unknown property.
Ignored -webkit-transform: rotate(180deg) at 4:3618, unknown property.
Ignored -ms-transform: rotate(180deg) at 4:3651, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3) at 4:3720, unknown property.
Ignored -webkit-transform: rotate(270deg) at 4:3784, unknown property.
Ignored -ms-transform: rotate(270deg) at 4:3817, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0) at 4:3891, unknown property.
Ignored -webkit-transform: scale(-1, 1) at 4:3955, unknown property.
Ignored -ms-transform: scale(-1, 1) at 4:3986, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2) at 4:4054, unknown property.
Ignored -webkit-transform: scale(1, -1) at 4:4118, unknown property.
Ignored -ms-transform: scale(1, -1) at 4:4149, unknown property.
Ignored filter: none at 4:4311, unknown property.
Ignored -webkit-transition: opacity 0.05s ease-in at 4:32804, unknown property.
Ignored -moz-transition: opacity 0.05s ease-in at 4:32845, unknown property.
Ignored transition: opacity 0.05s ease-in at 4:32883, unknown property.
Ignored box-shadow: 0 5px 5px 0 rgba(0,0,0,0.1) at 4:45143, unknown property.
Ignored -webkit-transition: all 0.3s ease-in at 4:45263, unknown property.
Ignored -moz-transition: all 0.3s ease-in at 4:45299, unknown property.
Ignored transition: all 0.3s ease-in at 4:45332, unknown property.
Ignored cursor: pointer at 4:45848, the property does not apply for the print media.
Ignored -webkit-appearance: button at 4:45882, unknown property.
Invalid or unsupported selector 'button::-moz-focus-inner,input::-moz-focus-inner', Unknown pseudo-element: -moz-focus-inner
Ignored cursor: default at 4:46011, the property does not apply for the print media.
Ignored cursor: pointer at 4:46126, the property does not apply for the print media.
Ignored box-shadow: 0px 1px 2px -1px rgba(255,255,255,0.5) inset,0px -2px 0px 0px rgba(0,0,0,0.1) inset at 4:46359, unknown property.
Ignored outline-none: false at 4:46454, unknown property.
Ignored zoom: 1 at 4:46511, unknown property.
Ignored -webkit-user-drag: none at 4:46518, unknown property.
Ignored -webkit-user-select: none at 4:46541, unknown property.
Ignored -moz-user-select: none at 4:46566, unknown property.
Ignored -ms-user-select: none at 4:46588, unknown property.
Ignored user-select: none at 4:46609, unknown property.
Ignored -webkit-transition: all 0.1s linear at 4:46626, unknown property.
Ignored -moz-transition: all 0.1s linear at 4:46661, unknown property.
Ignored transition: all 0.1s linear at 4:46693, unknown property.
Ignored box-shadow: 0px -1px 0px 0px rgba(0,0,0,0.05) inset,0px 2px 0px 0px rgba(0,0,0,0.1) inset at 4:46854, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.gradient(enabled = false) at 4:47029, unknown property.
Ignored filter: alpha(opacity=40) at 4:47096, unknown property.
Ignored cursor: not-allowed at 4:47133, the property does not apply for the print media.
Ignored box-shadow: none at 4:47152, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.gradient(enabled = false) at 4:47204, unknown property.
Ignored filter: alpha(opacity=40) at 4:47271, unknown property.
Ignored cursor: not-allowed at 4:47308, the property does not apply for the print media.
Ignored box-shadow: none at 4:47327, unknown property.
Ignored filter: progid:DXImageTransform.Microsoft.gradient(enabled = false) at 4:47426, unknown property.
Ignored filter: alpha(opacity=40) at 4:47493, unknown property.
Ignored cursor: not-allowed at 4:47530, the property does not apply for the print media.
Ignored box-shadow: none at 4:47549, unknown property.
Invalid or unsupported selector '.btn::-moz-focus-inner', Unknown pseudo-element: -moz-focus-inner
Ignored box-shadow: none at 4:48378, unknown property.
Ignored box-shadow: none at 4:48511, unknown property.
Ignored box-shadow: none at 4:48609, unknown property.
Ignored box-shadow: 0 2px 2px 0 rgba(0,0,0,0.1) at 4:49104, unknown property.
Ignored cursor: pointer at 4:49266, the property does not apply for the print media.
Invalid or unsupported selector '.wy-control-group .wy-form-halves:nth-of-type(2n)', *:nth-of-type() is not implemented
Invalid or unsupported selector '.wy-control-group .wy-form-halves:nth-of-type(2n+1)', *:nth-of-type() is not implemented
Invalid or unsupported selector '.wy-control-group .wy-form-thirds:nth-of-type(3n)', *:nth-of-type() is not implemented
Invalid or unsupported selector '.wy-control-group .wy-form-thirds:nth-of-type(3n+1)', *:nth-of-type() is not implemented
Ignored -webkit-appearance: button at 4:56193, unknown property.
Ignored cursor: pointer at 4:56219, the property does not apply for the print media.
Ignored -webkit-appearance: none at 4:56609, unknown property.
Ignored box-shadow: inset 0 1px 3px #ddd at 4:56770, unknown property.
Ignored -webkit-transition: border 0.3s linear at 4:56818, unknown property.
Ignored -moz-transition: border 0.3s linear at 4:56856, unknown property.
Ignored transition: border 0.3s linear at 4:56891, unknown property.
Ignored cursor: default at 4:56992, the property does not apply for the print media.
Ignored -webkit-box-sizing: border-box at 4:57050, unknown property.
Ignored -moz-box-sizing: border-box at 4:57080, unknown property.
Ignored -webkit-box-sizing: border-box at 4:57207, unknown property.
Ignored -moz-box-sizing: border-box at 4:57237, unknown property.
Ignored -webkit-appearance: none at 4:57385, unknown property.
Ignored outline: thin dotted \9 at 4:57792, invalid value.
Ignored outline: 1px auto #129FEA at 4:57988, invalid value.
Ignored cursor: not-allowed at 4:58442, the property does not apply for the print media.
Invalid or unsupported selector 'input:focus:invalid,textarea:focus:invalid,select:focus:invalid', The pseudo-class :invalid is unknown
Invalid or unsupported selector 'input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus', The pseudo-class :invalid is unknown
Invalid or unsupported selector 'input[type="file"]:focus:invalid:focus,input[type="radio"]:focus:invalid:focus,input[type="checkbox"]:focus:invalid:focus', The pseudo-class :invalid is unknown
Ignored box-shadow: inset 0 1px 3px #ddd at 4:59101, unknown property.
Ignored -webkit-transition: border 0.3s linear at 4:59133, unknown property.
Ignored -moz-transition: border 0.3s linear at 4:59171, unknown property.
Ignored transition: border 0.3s linear at 4:59206, unknown property.
Ignored cursor: not-allowed at 4:59442, the property does not apply for the print media.
Ignored cursor: not-allowed at 4:59549, the property does not apply for the print media.
Ignored cursor: pointer at 4:60240, the property does not apply for the print media.
Ignored -webkit-transition: all 0.2s ease-in-out at 4:60255, unknown property.
Ignored -moz-transition: all 0.2s ease-in-out at 4:60295, unknown property.
Ignored transition: all 0.2s ease-in-out at 4:60332, unknown property.
Ignored -webkit-transition: all 0.2s ease-in-out at 4:60501, unknown property.
Ignored -moz-transition: all 0.2s ease-in-out at 4:60541, unknown property.
Ignored transition: all 0.2s ease-in-out at 4:60578, unknown property.
Ignored cursor: not-allowed at 4:60888, the property does not apply for the print media.
Ignored -webkit-transform: rotate(90deg) at 4:62446, unknown property.
Ignored -moz-transform: rotate(90deg) at 4:62478, unknown property.
Ignored -ms-transform: rotate(90deg) at 4:62507, unknown property.
Ignored -o-transform: rotate(90deg) at 4:62535, unknown property.
Ignored -webkit-transform: rotate(180deg) at 4:62598, unknown property.
Ignored -moz-transform: rotate(180deg) at 4:62631, unknown property.
Ignored -ms-transform: rotate(180deg) at 4:62661, unknown property.
Ignored -o-transform: rotate(180deg) at 4:62690, unknown property.
Ignored -webkit-transform: rotate(270deg) at 4:62755, unknown property.
Ignored -moz-transform: rotate(270deg) at 4:62788, unknown property.
Ignored -ms-transform: rotate(270deg) at 4:62818, unknown property.
Ignored -o-transform: rotate(270deg) at 4:62847, unknown property.
Ignored -webkit-transform: scaleX(-1) at 4:62908, unknown property.
Ignored -moz-transform: scaleX(-1) at 4:62937, unknown property.
Ignored -ms-transform: scaleX(-1) at 4:62963, unknown property.
Ignored -o-transform: scaleX(-1) at 4:62988, unknown property.
Ignored -webkit-transform: scaleX(-1) rotate(90deg) at 4:63051, unknown property.
Ignored -moz-transform: scaleX(-1) rotate(90deg) at 4:63094, unknown property.
Ignored -ms-transform: scaleX(-1) rotate(90deg) at 4:63134, unknown property.
Ignored -o-transform: scaleX(-1) rotate(90deg) at 4:63173, unknown property.
Ignored -webkit-transform: scaleX(-1) rotate(180deg) at 4:63265, unknown property.
Ignored -moz-transform: scaleX(-1) rotate(180deg) at 4:63309, unknown property.
Ignored -ms-transform: scaleX(-1) rotate(180deg) at 4:63350, unknown property.
Ignored -o-transform: scaleX(-1) rotate(180deg) at 4:63390, unknown property.
Ignored -webkit-transform: scaleX(-1) rotate(270deg) at 4:63484, unknown property.
Ignored -moz-transform: scaleX(-1) rotate(270deg) at 4:63528, unknown property.
Ignored -ms-transform: scaleX(-1) rotate(270deg) at 4:63569, unknown property.
Ignored -o-transform: scaleX(-1) rotate(270deg) at 4:63609, unknown property.
Ignored cursor: pointer at 4:68339, the property does not apply for the print media.
Ignored overflow-x: hidden at 4:68417, unknown property.
Ignored overflow-x: hidden at 4:68557, unknown property.
Ignored overflow-x: auto at 4:70112, unknown property.
Ignored overflow-x: auto at 4:72366, unknown property.
Ignored padding-left: 1.618em -4px at 4:77367, invalid value.
Ignored cursor: pointer at 4:79253, the property does not apply for the print media.
Ignored cursor: pointer at 4:79380, the property does not apply for the print media.
Ignored -webkit-transition: all 0.2s ease-in at 4:80766, unknown property.
Ignored -moz-transition: all 0.2s ease-in at 4:80802, unknown property.
Ignored transition: all 0.2s ease-in at 4:80835, unknown property.
Ignored overflow-x: hidden at 4:82580, unknown property.
Ignored overflow-y: hidden at 4:82598, unknown property.
Ignored overflow-x: hidden at 4:82709, unknown property.
Ignored overflow-y: scroll at 4:82727, unknown property.
Ignored cursor: pointer at 4:83199, the property does not apply for the print media.
Ignored cursor: pointer at 4:85466, the property does not apply for the print media.
Parse error at 1:209, expected a property name, got DELIM
Parse error at 1:225, expected a property name, got DELIM
Parse error at 1:1363, expected a property name, got DELIM
Parse error at 1:1487, expected a property name, got DELIM
Parse error at 1:1652, expected a property name, got DELIM
Parse error at 1:1793, expected a property name, got DELIM
Parse error at 1:1805, expected a property name, got DELIM
Parse error at 1:2489, expected a property name, got DELIM
Parse error at 1:5136, expected a property name, got DELIM
Parse error at 4:4, unknown at-rule in stylesheet context: @font-face
Parse error at 4:3089, unknown at-rule in stylesheet context: @-webkit-keyframes
Parse error at 4:3237, unknown at-rule in stylesheet context: @Keyframes
Parse error at 4:45658, expected a media type, got IDENT, IDENT, (
Parse error at 4:45825, expected a property name, got DELIM
Parse error at 4:45908, expected a property name, got DELIM
Parse error at 4:46495, expected a property name, got DELIM
Parse error at 4:48748, expected a property name, got DELIM
Parse error at 4:50604, expected a property name, got DELIM
Parse error at 4:50620, expected a property name, got DELIM
Parse error at 4:51057, expected a property name, got DELIM
Parse error at 4:51212, expected a property name, got DELIM
Parse error at 4:51272, expected a property name, got DELIM
Parse error at 4:51330, expected a property name, got DELIM
Parse error at 4:56302, expected a property name, got DELIM
Parse error at 4:57161, expected a property name, got DELIM
Parse error at 4:57174, expected a property name, got DELIM
Parse error at 4:59736, expected a property name, got DELIM
Parse error at 4:59752, expected a property name, got DELIM
Parse error at 4:63691, expected a media type, got IDENT, IDENT, IDENT, (
Parse error at 4:64941, expected a media type, got IDENT, IDENT, (
Parse error at 4:65005, expected a media type, got IDENT, IDENT, (
Parse error at 4:75499, expected a media type, got IDENT, IDENT, (
Parse error at 4:75775, expected a property name, got DELIM
Parse error at 4:82905, expected a property name, got DELIM
Parse error at 4:83941, expected a property name, got DELIM
Parse error at 4:84388, expected a media type, got IDENT, IDENT, (
Parse error at 4:84832, expected a media type, got IDENT, IDENT, (
Parse error at 4:85495, expected a property name, got DELIM
Parse error at 4:88784, expected a media type, got IDENT, IDENT, (
Parse error at 4:96012, expected a media type, got IDENT, IDENT, (
Parse error at 4:96139, unknown at-rule in stylesheet context: @font-face
Parse error at 4:96321, unknown at-rule in stylesheet context: @font-face
Parse error at 4:96502, unknown at-rule in stylesheet context: @font-face
Parse error at 4:96664, unknown at-rule in stylesheet context: @font-face
Parse error at 4:96817, unknown at-rule in stylesheet context: @font-face
Parse error at 4:97005, unknown at-rule in stylesheet context: @font-face
Ignored -moz-border-radius: 3px at 76:5, unknown property.
Ignored -webkit-border-radius: 3px at 77:5, unknown property.
Parse error at 51:8, expected a media type, got (

What am I doing wrong? Thanks very much

@liZe
Copy link
Member

liZe commented Jun 24, 2016

There's nothing wrong. WeasyPrint logs the "errors" and the unknown properties found in the CSS. For example, @font-face is not implemented in WeasyPrint and is then seen as an error by the parser, the rule is just ignored. That's how other browsers work too, even if they're not as verbose as WeasyPrint.

The rules known by WeasyPrint work correctly.

The style of the PDF you get is different of what you get on your browser because the CSS has a part specially for the print (it's much better without the menu, isn't it?).

The content is cut at the end of the first page because there's a floating element, and floating elements are currently not cut at the end of the page in WeasyPrint (#36). I'll fix that.

@liZe
Copy link
Member

liZe commented Jun 24, 2016

It's now fixed. For the record, the documentation was cut because of an absolute block, not because of float.

@liZe liZe closed this as completed Jun 24, 2016
@liZe liZe added the documentation Problems or improvements needed on the documentation or on the website label Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Problems or improvements needed on the documentation or on the website
Projects
None yet
Development

No branches or pull requests

2 participants