Weasyprint GLib错误
我安装了WeasyPrint和它文档里提到的所有包。
我用的是Mac OS X 10.8.2和Python 2.7,并且在我的虚拟环境中安装了WeasyPrint。
现在当我尝试运行这段代码:
HTML('http://weasyprint.org/').write_pdf('/tmp/weasyprint-website.pdf')我在控制台里看到以下信息:
pydev debugger: starting
Ignored border-radius: 6px at 12:3, unknown property.
Ignored background: linear-gradient(#000, #111) at 59:3, invalid value.
Ignored box-shadow: 0 0 1em #888 at 65:3, unknown property.
Ignored text-shadow: 0 0 0.5em #444 at 77:3, unknown property.
Ignored transition: color 0.25s at 150:3, unknown property.
Ignored box-shadow: 0px 0px 2px #ddd at 167:3, unknown property.
Ignored border-radius: 0.2em at 168:3, unknown property.
Ignored text-shadow: 1px 1px 1px #111 at 171:3, unknown property.
Ignored transition: background 0.7s ease at 251:3, unknown property.
Ignored border-radius: 0.2em at 279:3, unknown property.
Ignored box-shadow: 0 0 2px #b7b7b7 at 280:3, unknown property.
Ignored background: url(img/content_haut.png) no-repeat top left,
url(img/bas.png) no-repeat bottom right at 301:3, invalid value.
Ignored border-radius: 0.2em at 305:3, unknown property.
Ignored transition: background-color 0.3s linear at 368:3, unknown property.
Ignored box-shadow: 0 0 5px #D60 at 373:3, unknown property.
Parse error at 7:1, unknown at-rule in stylesheet context: @font-face
Parse error at 12:1, unknown at-rule in stylesheet context: @font-face
Parse error at 17:1, unknown at-rule in stylesheet context: @font-face
Parse error at 22:1, unknown at-rule in stylesheet context: @font-face
Parse error at 26:1, unknown at-rule in stylesheet context: @font-face
Parse error at 31:1, unknown at-rule in stylesheet context: @font-face
(process:49474): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
(process:49474): GLib-CRITICAL **: void g_once_init_leave(volatile void *, gsize): assertion `result != 0' failed
(process:49474): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
(process:49474): GLib-CRITICAL **: void g_once_init_leave(volatile void *, gsize): assertion `result != 0' failed
(process:49474): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
(process:49474): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
我在网上搜索了GLib-GObject-CRITICAL,但没有找到解决办法,有人知道怎么解决这个问题吗?我对Python还比较陌生,如果你需要更多信息,请告诉我!