This code gives: print type(pango_context), type(options) # Just for test pangocairo.context_set_font_options(pango_context, options) On Linux: <type 'pango.Context'> <type 'cairo.FontOptions'> No error msg With: Python 2.6.4 pycairo 1.8.6 pygtk 2.16.0 --------------------------------- But On Windows XP and Windows 7: <type 'pango.Context'> <type 'cairo.FontOptions'> ... File "C:\Program Files (x86)\gramps\plugins\docgen\PdfDoc.py", line 100, in run pangocairo.context_set_font_options(pango_context, options) TypeError: font_options must be a cairo.FontOptions or None With: Python 2.6.5 pycairo 1.8.6 pygtk 2.16.0
The title is incorrect: "Error in Windows, but not in Linux when calling pycairo" should be "... when calling pygtk". since pangocairo.context_set_font_options is part of pygtk not pycairo. This looks like an installation error, where pygtk has been compiled against one version of pycairo, and then pycairo has been upgraded without upgrading/recompiling pygtk to match. See https://bugs.freedesktop.org/show_bug.cgi?id=23073
Thanks! From what I read in the referenced bug report: The Windows version of pygtk is not be compiled against the correct version of pycairo, but the my Linux distro (Mandriva) has done it correct. I'll check with those who who made the pygtk binary for Windows.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.