Bug 28237

Summary: Error in Windows, but not in Linux when calling pycairo
Product: pycairo Reporter: Peter Landgren <peter.talken>
Component: generalAssignee: Steve Chaplin <d74n5pohf9>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: blocker    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:

Description Peter Landgren 2010-05-25 00:51:11 UTC
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
Comment 1 Steve Chaplin 2010-05-25 19:41:51 UTC
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
Comment 2 Peter Landgren 2010-05-25 23:03:45 UTC
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.