{"id":2736,"date":"2022-08-30T15:27:21","date_gmt":"2022-08-30T15:27:21","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/pycobject_importcairo-capi-c-call-yields-segfault-import-cairo-on-python-works-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:21","modified_gmt":"2022-08-30T15:27:21","slug":"pycobject_importcairo-capi-c-call-yields-segfault-import-cairo-on-python-works-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/pycobject_importcairo-capi-c-call-yields-segfault-import-cairo-on-python-works-collection-of-common-programming-errors\/","title":{"rendered":"&#39;PyCObject_Import(&ldquo;cairo&rdquo;, &ldquo;CAPI&rdquo;)&#39; C++ call yields segfault, &#39;import cairo&#39; on python works-Collection of common programming errors"},"content":{"rendered":"<p>I am running OSX Lion and trying to import the python module for goocanvas, using python2.7.<\/p>\n<p>I managed to successfully compile pygoocanvas-0.14.1, but when I try to <code>import goocanvas<\/code> through the python2.7 console, I get a segfault. After some debugging, I&#8217;m led to this code:<\/p>\n<pre><code>DL_EXPORT (void)\ninitgoocanvas (void)\n{\n    PyObject *m, *d;\n    fprintf(stderr,\"init<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-02-08 15:44:34. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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 *m, *d; fprintf(stderr,&#8221;init Originally [&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-2736","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2736","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=2736"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2736\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}