Error: Gtk, Gdk, GdkPixbuf
Hi, this is the first time I'm dabbling into graph-tool as I had always been using networkx. Anyway, I managed to successfully install the package via MacPorts. When I run: import graph_tool -- everything seems to be running okay. However, when I run: from graph_tool.all import * I am getting the following: ERROR:root:Could not find any typelib for Gtk ERROR:root:Could not find any typelib for Gdk ERROR:root:Could not find any typelib for GdkPixbuf Has anyone encountered this before? Were you able to resolve it? Thank you. E
On 04/18/2014 06:26 AM, EFTL wrote:
Hi, this is the first time I'm dabbling into graph-tool as I had always been using networkx. Anyway, I managed to successfully install the package via MacPorts.
When I run: import graph_tool -- everything seems to be running okay.
However, when I run: from graph_tool.all import *
I am getting the following:
ERROR:root:Could not find any typelib for Gtk
ERROR:root:Could not find any typelib for Gdk
ERROR:root:Could not find any typelib for GdkPixbuf
Has anyone encountered this before? Were you able to resolve it?
These are just warnings, right? The module actually imports successfully? This is probably just because you don't have GTK+ 3 installed, which is needed for interactive visualization. Just do: port install gtk3 and everything should work. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Thanks, Tiago. I do have gtk3 installed. What I did was install XQuartz instead, and it helped fix this particular issue-- allowing me to run that line (from graph_tool.all import *) without error. However, this error appeared gi._glib.GError: Couldn't recognize the image file format for file '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/graph-tool-logo.svg' Exception AttributeError: "'GraphWindow' object has no attribute 'graph'" in <bound method GraphWindow.__del__ of <GraphWindow object at 0x13348b690 (graph_tool+draw+gtk_draw+GraphWindow at 0x7fb15c82a320)>> ignored when I ran this: from graph_tool.all import * g1 = Graph() v1 = g1.add_vertex() v2 = g1.add_vertex() e = g1.add_edge(v1,v2) graph_draw(g1, *vertex_text* = g1.vertex_index, *vertex_font_size* = 18) I couldn't find any other solutions online. Thanks again. Best, E On Friday, April 18, 2014 3:21:10 PM UTC+8, Tiago Peixoto wrote:
On 04/18/2014 06:26 AM, EFTL wrote:
Hi, this is the first time I'm dabbling into graph-tool as I had always been using networkx. Anyway, I managed to successfully install the package via MacPorts.
When I run: import graph_tool -- everything seems to be running okay.
However, when I run: from graph_tool.all import *
I am getting the following:
ERROR:root:Could not find any typelib for Gtk
ERROR:root:Could not find any typelib for Gdk
ERROR:root:Could not find any typelib for GdkPixbuf
Has anyone encountered this before? Were you able to resolve it?
These are just warnings, right? The module actually imports successfully?
This is probably just because you don't have GTK+ 3 installed, which is needed for interactive visualization. Just do:
port install gtk3
and everything should work.
Best, Tiago
-- Tiago de Paula Peixoto <ti...@skewed.de <javascript:>>
On 04/18/2014 12:08 PM, EFTL wrote:
Thanks, Tiago. I do have gtk3 installed. What I did was install XQuartz instead, and it helped fix this particular issue-- allowing me to run that line (from graph_tool.all import *) without error.
However, this error appeared
gi._glib.GError: Couldn't recognize the image file format for file '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/graph-tool-logo.svg' Exception AttributeError: "'GraphWindow' object has no attribute 'graph'" in <bound method GraphWindow.__del__ of <GraphWindow object at 0x13348b690 (graph_tool+draw+gtk_draw+GraphWindow at 0x7fb15c82a320)>> ignored
when I ran this:
from graph_tool.all import *
g1 = Graph() v1 = g1.add_vertex() v2 = g1.add_vertex() e = g1.add_edge(v1,v2)
graph_draw(g1, /vertex_text/ = g1.vertex_index, /vertex_font_size/ = 18)
I couldn't find any other solutions online.
For some reason the macports port for Gtk does not include the default SVG libraries. You have to install it: port install librsvg Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Thanks, Tiago! That (port install librsvg) fixed it. Whew. No more errors at the moment. Cheers! - E On Friday, April 18, 2014 6:11:07 PM UTC+8, Tiago Peixoto wrote:
On 04/18/2014 12:08 PM, EFTL wrote:
Thanks, Tiago. I do have gtk3 installed. What I did was install XQuartz instead, and it helped fix this particular issue-- allowing me to run that line (from graph_tool.all import *) without error.
However, this error appeared
gi._glib.GError: Couldn't recognize the image file format for file '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/graph_tool/draw/graph-tool-logo.svg'
Exception AttributeError: "'GraphWindow' object has no attribute 'graph'" in <bound method GraphWindow.__del__ of <GraphWindow object at 0x13348b690 (graph_tool+draw+gtk_draw+GraphWindow at 0x7fb15c82a320)>> ignored
when I ran this:
from graph_tool.all import *
g1 = Graph() v1 = g1.add_vertex() v2 = g1.add_vertex() e = g1.add_edge(v1,v2)
graph_draw(g1, /vertex_text/ = g1.vertex_index, /vertex_font_size/ = 18)
I couldn't find any other solutions online.
For some reason the macports port for Gtk does not include the default SVG libraries. You have to install it:
port install librsvg
Best, Tiago
-- Tiago de Paula Peixoto <ti...@skewed.de <javascript:>>
On 04/18/2014 12:19 PM, EFTL wrote:
Thanks, Tiago! That (port install librsvg) fixed it. Whew. No more errors at the moment. Cheers!
Overall, which ports did you need to install to get the full functionality? This is would be good information to put on the webpage. -- Tiago de Paula Peixoto <tiago@skewed.de>
Hi! I have the same issue. Have not resolved it yet. Thanks, On Apr 17, 2014, at 9:26 PM, EFTL <etlegara@gmail.com> wrote:
Hi, this is the first time I'm dabbling into graph-tool as I had always been using networkx. Anyway, I managed to successfully install the package via MacPorts.
When I run: import graph_tool -- everything seems to be running okay.
However, when I run: from graph_tool.all import *
I am getting the following:
ERROR:root:Could not find any typelib for Gtk ERROR:root:Could not find any typelib for Gdk ERROR:root:Could not find any typelib for GdkPixbuf
Has anyone encountered this before? Were you able to resolve it?
Thank you.
E _______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
Hi, After updating graph-tool ( to version |2.2.31 (commit 245d1e2c, Thu Mar 27 11:28:39 2014 +0100)|), and a bunch of over things as I passed to Mint 15 to Mint 16, I encounter the following value error, when I manipulates parts of a PropertyMap (through indexing or via the |.fa| attribute (bellow, |dthetas| is an edge propertymap on a graph): |lower_than = [dthetas.a < -tau/2.] dthetas.a[lower_than] += tau ValueError: output arrayis read-only| Note that the following doesn't rise the error: | lower_than = [dthetas.a < -tau/2.] dthetas.a[lower_than] = dthetas.a[lower_than] + tau| It also happen when I filter a graph and do for example |eprop.fa *= 2| I just wanted to know if this is expected, and I‘ll go fix my code everywhere I do that kind of assignation, or if it is unintended (and I’ll go fix my code anyway ;-). Best, Guillaume
On 04/18/2014 11:06 AM, Guillaume Gay wrote:
Hi,
After updating graph-tool ( to version |2.2.31 (commit 245d1e2c, Thu Mar 27 11:28:39 2014 +0100)|), and a bunch of over things as I passed to Mint 15 to Mint 16, I encounter the following value error, when I manipulates parts of a PropertyMap (through indexing or via the |.fa| attribute (bellow, |dthetas| is an edge propertymap on a graph):
|lower_than = [dthetas.a < -tau/2.] dthetas.a[lower_than] += tau
ValueError: output array is read-only|
Note that the following doesn't rise the error:
| lower_than = [dthetas.a < -tau/2.] dthetas.a[lower_than] = dthetas.a[lower_than] + tau|
It also happen when I filter a graph and do for example |eprop.fa *= 2|
I don't observe this. What numpy version are you using? Do you see the same behavior if you use lower_than = dthetas.a < -tau/2. i.e. without the square brackets? Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Do you see the same behavior if you use |lower_than = dthetas.a < -tau/2| Yes I do. |lower_than = eptm.dthetas.a < -np.pi eptm.dthetas.a[lower_than] +=2 * np.pi
ValueError|
This also rises an error: |graph.set_vertex_filter(vfilt) colors.fa -=5 graph.set_vertex_filter(None)| But not this: |graph.set_vertex_filter(vfilt) colors.a -=5 # Whole array graph.set_vertex_filter(None)| What numpy version are you using? np.*version* >> ‘1.9.0.dev-61c699e’ Le 18/04/2014 11:22, Tiago de Paula Peixoto a écrit :
On 04/18/2014 11:06 AM, Guillaume Gay wrote:
Hi,
After updating graph-tool ( to version |2.2.31 (commit 245d1e2c, Thu Mar 27 11:28:39 2014 +0100)|), and a bunch of over things as I passed to Mint 15 to Mint 16, I encounter the following value error, when I manipulates parts of a PropertyMap (through indexing or via the |.fa| attribute (bellow, |dthetas| is an edge propertymap on a graph):
|lower_than = [dthetas.a < -tau/2.] dthetas.a[lower_than] += tau
ValueError: output array is read-only|
Note that the following doesn't rise the error:
| lower_than = [dthetas.a < -tau/2.] dthetas.a[lower_than] = dthetas.a[lower_than] + tau|
It also happen when I filter a graph and do for example |eprop.fa *= 2|
I don't observe this. What numpy version are you using?
Do you see the same behavior if you use
lower_than = dthetas.a < -tau/2.
i.e. without the square brackets?
Best, Tiago
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
On 04/18/2014 11:37 AM, Guillaume Gay wrote:
What numpy version are you using?
np.*version* >> ‘1.9.0.dev-61c699e’
I'm using 1.8.1 here. So, it seems they changed the semantics of indexed array assignments... Can you observe the same with plain numpy arrays?, i.e: a = arange(10) m = a > 5 a[m] += 2 a[:][m] += 2 Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
On 04/18/2014 11:48 AM, Guillaume Gay wrote:
Le 18/04/2014 11:43, Tiago de Paula Peixoto a écrit :
a = arange(10) m = a > 5 a[m] += 2 a[:][m] += 2
This doesn't rise the ValueError
Ok, it looks like something nontrivial changed in the internals of numpy 1.9. I'll have to investigate... But I'll wait until version 1.9 is actually released, to be sure it is not some bug. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
OK, no problem, a good occasion to revise my code... Thanks, Guillaume Le 18/04/2014 11:51, Tiago de Paula Peixoto a écrit :
On 04/18/2014 11:48 AM, Guillaume Gay wrote:
Le 18/04/2014 11:43, Tiago de Paula Peixoto a écrit :
a = arange(10) m = a > 5 a[m] += 2 a[:][m] += 2
This doesn't rise the ValueError Ok, it looks like something nontrivial changed in the internals of numpy 1.9. I'll have to investigate... But I'll wait until version 1.9 is actually released, to be sure it is not some bug.
Best, Tiago
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
participants (5)
-
EFTL -
etlegara@gmail.com -
Guillaume Gay -
Panagiotis Achlioptas -
Tiago de Paula Peixoto