Comments (11)
Hi,
Thanks for reporting this. I can’t reproduce this on Linux, and don’t have a Mac to test. What happens afterwards? Does Python crash? Do you get a traceback? Do you get a PDF file?
In any case, I just pushed a change to master to add a call to gobject.g_type_init()
. Can you try the git version and see if it fixes the issue? This should work:
pip install git+git://github.com/Kozea/WeasyPrint.git
from weasyprint.
I tried the git version out and still get the same error ...
No crash, no traceback no pdf ...
(process:99407): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
(process:99407): GLib-CRITICAL **: void g_once_init_leave(volatile void *, gsize): assertion `result != 0' failed
(process:99407): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
(process:99407): GLib-CRITICAL **: void g_once_init_leave(volatile void *, gsize): assertion `result != 0' failed
(process:99407): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
(process:99407): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
from weasyprint.
Hello, Is it the same error or I just installed something wrong?
Windows 7. Python 2.7.
gtk2-runtime-2.24.10-2012-10-10-ash.exe
pygtk-all-in-one-2.24.0.win32-py2.7.msi
CFFI and lxml from http://www.lfd.uci.edu/~gohlke/pythonlibs/
just trying to "from weasyprint import HTML"
File "D:_IDE\eclipse\workspace\test\src\main.py", line 5, in
from weasyprint import HTML
File "D:_IDE\eclipse\workspace\test\src\lib\weasyprint_init_.py", line 304, in
from .css import PARSER, preprocess_stylesheet
File "D:_IDE\eclipse\workspace\test\src\lib\weasyprint\css_init_.py", line 30, in
from . import computed_values
File "D:_IDE\eclipse\workspace\test\src\lib\weasyprint\css\computed_values.py", line 20, in
from .. import text
File "D:_IDE\eclipse\workspace\test\src\lib\weasyprint\text.py", line 182, in
gobject.g_type_init()
File "C:\dev\Python27\lib\site-packages\cffi\api.py", line 385, in getattr
make_accessor(name)
File "C:\dev\Python27\lib\site-packages\cffi\api.py", line 381, in make_accessor
raise AttributeError(name)
AttributeError: g_type_init
from weasyprint.
My mistake. @migrome , can you try again with the change I just pushed to master? @tdhulster , if you did not have the same AttributeError @migrome , I suspect you might not be using the git version.
from weasyprint.
Works fine, thank you.
from weasyprint.
I did this :
pip install git+git://github.com/Kozea/WeasyPrint.git
But do I have to do something more to use it or should that work?
from weasyprint.
@tdhulster do you still have the error with the latest master now? Sometimes pip does nothing when it thinks everything is already installed. Does the output ends with something like "Installed WeasyPrint"? If not, try pip install --upgrade --no-deps
(Just --upgrade
would also reinstall all dependencies recursively.)
from weasyprint.
@tdhulster, I believe this bug is fixed now. Can you confirm? (Make sure you’re using the latest master, see previous message.)
from weasyprint.
Closing for lack of response plus belief that this is fixed.
from weasyprint.
I am getting the same error in mac. Was this resolved?
from weasyprint.
I am getting the same error on Arch Linux, and I used the last version (42.03).
from weasyprint.
Related Issues (20)
- Text clipped when using text-anchor="middle" HOT 2
- Weasyprint.exe : Fontconfig error: Cannot load default config file: No such file: (null) HOT 8
- Support of `@media only` HOT 4
- Migrate to resvg? HOT 2
- Support grid-auto-flow: column HOT 4
- Fonts breaking in v62 HOT 8
- Grid support enhancements
- v62 - TypeError: can't multiply sequence by non-int of type 'float' HOT 1
- Create single page pdf for thermal printer HOT 1
- Bold font sometimes work but sometimes doesn't HOT 2
- Grid support with errors (print-css-rocks) HOT 3
- PDF/UA accessibility. Labeled strange. HOT 1
- TypeError: can only concatenate str (not "float") to str (after update from 61.2 to 62.1) HOT 5
- Tailwind color codes are incompatible HOT 2
- Issue when trying to write a pdf with the openssl_md5 function in your library HOT 1
- Failure when building wheel for 62.1 from pypi HOT 5
- Add support for ol start attribute HOT 2
- Weasyprint (62.1) broken on macOS using Python 3.12.3 from python.org HOT 3
- python api: set created date HOT 3
- Support overflow-x/y HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weasyprint.