Bug 28237 - Error in Windows, but not in Linux when calling pycairo
Summary: Error in Windows, but not in Linux when calling pycairo
Status: RESOLVED NOTOURBUG
Alias: None
Product: pycairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Windows (All)
: medium blocker
Assignee: Steve Chaplin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 00:51 UTC by Peter Landgren
Modified: 2010-05-25 23:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.