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>