{"id":2750,"date":"2022-08-30T15:27:28","date_gmt":"2022-08-30T15:27:28","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/problem-about-pycairo-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:28","modified_gmt":"2022-08-30T15:27:28","slug":"problem-about-pycairo-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-pycairo-collection-of-common-programming-errors\/","title":{"rendered":"problem about pycairo-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li>\n<img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d4a6fedba56c0767d6e8613007fb188e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJason Sundram<br \/>\nc++ python segmentation-fault python-c-api pycairo<br \/>\nI am running OSX Lion and trying to import the python module for goocanvas, using python2.7.I managed to successfully compile pygoocanvas-0.14.1, but when I try to import goocanvas through the python2.7 console, I get a segfault. After some debugging, I&#8217;m led to this code:DL_EXPORT (void) initgoocanvas (void) {PyObject *m, *d;fprintf(stderr,&#8221;init&lt;&lt; \\n&#8221;);\/\/ Pycairo_IMPORT; \/\/ XXX removed, it expands to the line below, anywaysPycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import(&#8220;cairo&#8221;, &#8220;CAP<\/li>\n<li>\n<img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/684450912\/picture?type=large\" \/><br \/>\nsbaechler<br \/>\npython distutils cairo py2app pycairo<br \/>\nI just fixed a bug in a two year old python program and now I&#8217;m having big trouble getting it to compile again. I simply cannot get Python, Cairo, wx and distutils to work together.On OSX I managed to get Python 2.7 to import Cairo and WX but py2app does not work. The error is something about unknown architecture.On Windows 7 I have not been able to successfully import cairo. I installed py2cairo and put the libcairo-2.dll in Windows\/System32 but still get an import error. I even copied msvcr90.<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2014-02-08 15:56:34. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Jason Sundram c++ python segmentation-fault python-c-api pycairo I am running OSX Lion and trying to import the python module for goocanvas, using python2.7.I managed to successfully compile pygoocanvas-0.14.1, but when I try to import goocanvas through the python2.7 console, I get a segfault. After some debugging, I&#8217;m led to this code:DL_EXPORT (void) initgoocanvas (void) {PyObject [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2750","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2750"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2750\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}