Hi Tiago: I encountered a puzzling error message while loading a graph: Here is the trace: Running `python "workers.py"' in directory `/home/jrp/GRAF' Traceback (most recent call last): File "workers.py", line 31, in <module> gt_gml('./_GT/grf.gt') File "workers.py", line 17, in gt_gml show_g_f(g) File "/home/jrp/GRAF/e_gops.py", line 152, in show_g_f g = load_graph(g_f) File "/usr/lib/python3/dist-packages/graph_tool/__init__.py", line 3285, in load_graph g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp) File "/usr/lib/python3/dist-packages/graph_tool/__init__.py", line 2834, in load ignore_vp, ignore_ep, ignore_gp) AttributeError: 'Graph' object has no attribute 'read' Exited Process exited with status -1 This is the first time it happens. What I don't understand is that lines 2833-2834 of __init__.py read as follows: props = self.__graph.read_from_file("", file_name, _c_str(fmt), ignore_vp, ignore_ep, ignore_gp) There is no invocation of a 'read attribute'...
Am 11.07.19 um 01:59 schrieb JeanPierre Paillet:
Hi Tiago: I encountered a puzzling error message while loading a graph: Here is the trace: Running `python "workers.py"' in directory `/home/jrp/GRAF' Traceback (most recent call last): File "workers.py", line 31, in <module> gt_gml('./_GT/grf.gt') File "workers.py", line 17, in gt_gml show_g_f(g) File "/home/jrp/GRAF/e_gops.py", line 152, in show_g_f g = load_graph(g_f) File "/usr/lib/python3/dist-packages/graph_tool/__init__.py", line 3285, in load_graph g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp) File "/usr/lib/python3/dist-packages/graph_tool/__init__.py", line 2834, in load ignore_vp, ignore_ep, ignore_gp) AttributeError: 'Graph' object has no attribute 'read' Exited Process exited with status -1
This is the first time it happens. What I don't understand is that lines 2833-2834 of __init__.py read as follows:
props = self.__graph.read_from_file("", file_name, _c_str(fmt), ignore_vp, ignore_ep, ignore_gp)
There is no invocation of a 'read attribute'...
It's difficult to say anything concrete from a stack trace without any other information. My guess is that g_f in 'File "/home/jrp/GRAF/e_gops.py", line 152' is not a file object or a string, as it should be. Please remember to *always* provide a minimal and self-contained example that shows the problem. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Hi Tiago: I understand the need for context. However, in this case you have the whole context. The function gt_gml starts with g = load_graph('./_GT/grf.gt') and this is the line causing the fault. ________________________________ From: graph-tool <graph-tool-bounces@skewed.de> on behalf of Tiago de Paula Peixoto <tiago@skewed.de> Sent: 11 July 2019 18:33 To: Main discussion list for the graph-tool project Subject: Re: [graph-tool] Puzzled Am 11.07.19 um 01:59 schrieb JeanPierre Paillet:
Hi Tiago: I encountered a puzzling error message while loading a graph: Here is the trace: Running `python "workers.py"' in directory `/home/jrp/GRAF' Traceback (most recent call last): File "workers.py", line 31, in <module> gt_gml('./_GT/grf.gt') File "workers.py", line 17, in gt_gml show_g_f(g) File "/home/jrp/GRAF/e_gops.py", line 152, in show_g_f g = load_graph(g_f) File "/usr/lib/python3/dist-packages/graph_tool/__init__.py", line 3285, in load_graph g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp) File "/usr/lib/python3/dist-packages/graph_tool/__init__.py", line 2834, in load ignore_vp, ignore_ep, ignore_gp) AttributeError: 'Graph' object has no attribute 'read' Exited Process exited with status -1
This is the first time it happens. What I don't understand is that lines 2833-2834 of __init__.py read as follows:
props = self.__graph.read_from_file("", file_name, _c_str(fmt), ignore_vp, ignore_ep, ignore_gp)
There is no invocation of a 'read attribute'...
It's difficult to say anything concrete from a stack trace without any other information. My guess is that g_f in 'File "/home/jrp/GRAF/e_gops.py", line 152' is not a file object or a string, as it should be. Please remember to *always* provide a minimal and self-contained example that shows the problem. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Am 11.07.19 um 22:27 schrieb JeanPierre Paillet:
Hi Tiago:
I understand the need for context. However, in this case you have the whole context. The function gt_gml starts with g = load_graph('./_GT/grf.gt')
You seem to be missing my point entirely. Without the *actual code*, not your interpretation or paraphrasing of it, there is nothing that can be said. Btw, your account above is completely inconsistent with the stack trace you sent, which includes the line "g = load_graph(g_f)". I'll repeat once more: Please remember to *always* provide a _minimal_ and _self-contained_ example that shows the problem. And as I said in the previous email, even from the incomplete information you sent, it's pretty clear that you are calling the load_graph() function with the wrong argument. -- Tiago de Paula Peixoto <tiago@skewed.de>
Tiago: Apologies for wasting your time. It all came down to a typo: I entered the name of the graph instead of the name of a file. ________________________________ From: graph-tool <graph-tool-bounces@skewed.de> on behalf of Tiago de Paula Peixoto <tiago@skewed.de> Sent: 12 July 2019 06:43 To: Main discussion list for the graph-tool project Subject: Re: [graph-tool] Puzzled Am 11.07.19 um 22:27 schrieb JeanPierre Paillet:
Hi Tiago:
I understand the need for context. However, in this case you have the whole context. The function gt_gml starts with g = load_graph('./_GT/grf.gt')
You seem to be missing my point entirely. Without the *actual code*, not your interpretation or paraphrasing of it, there is nothing that can be said. Btw, your account above is completely inconsistent with the stack trace you sent, which includes the line "g = load_graph(g_f)". I'll repeat once more: Please remember to *always* provide a _minimal_ and _self-contained_ example that shows the problem. And as I said in the previous email, even from the incomplete information you sent, it's pretty clear that you are calling the load_graph() function with the wrong argument. -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
JeanPierre Paillet -
Tiago de Paula Peixoto