I uploaded a gml file containing the dolphins social network.
Some time ago I did some analysis on this network running python 3.4 and networkx 1.9 on a Windows7 machine, but now I run on a Linux machine (with the same version of python, but with networkx 1.10 ) and found a problem while trying to read the file .
This is the code used to read the file:
import networkx as nx nx.read_gml("dolphins.gml")
And this is the error stack trace:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 2, in read_gml File "/usr/lib/python3.4/site-packages/networkx/utils/decorators.py",line 220, in _open_file result = func(*new_args, **kwargs) File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 210, in read_gml G = parse_gml_lines(filter_lines(path), label, destringizer) File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 383, in parse_gml_lines graph = parse_graph() File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 372, in parse_graph curr_token, dct = parse_kv(next(tokens)) File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 323, in tokenize (line[pos:], lineno + 1, pos + 1)) networkx.exception.NetworkXError: cannot tokenize 'graph' at (1, 1)
Can you read the file? Has anyone experienced a close problem? or knows what generates an error?
Thank you in advance!
source share