I try to use networkx to read in a gml file (quite simple?), Except whenever I try to read in a file, I get the error "networkx.exception.NetworkXError: cannot tokenize u'graph" at (3, 1) "I am not too familiar with gml or networkx, so I myself could not diagnose the problem.
What is even more strange, since my colleague will execute the same command with the same file, and it will execute without errors. I uninstalled and reinstalled networkx several times at this point, can anyone help to determine what the error might come from?
File, line 1, in
File "", line 2, in read_gml
File "/ usr / local / lib / python 2.7 / dist-packages / networkx / utils / decorators.py", line 220, in the file _open_file result = func (* new_args, ** kwargs)
File "/ usr / local / lib / python 2.7 / dist-packages / networkx / readwrite / gml.py", line 210, in read_gml G = parse_gml_lines (filter_lines (path), label, destringizer)
File "/ usr / local / lib / python 2.7 / dist-packages / networkx / readwrite / gml.py", line 383, in parse_gml_lines graph = parse_graph ()
File "/ usr / local / lib / python 2.7 / dist-packages / networkx / readwrite / gml.py", line 372, in parse_graph curr_token, dct = parse_kv (next (tokens))
File "/ usr / local / lib / python 2.7 / dist-packages / networkx / readwrite / gml.py", line 347, in parse_kv curr_token = next (tokens)
File "/ usr / local / lib / python 2.7 / dist-packages / networkx / readwrite / gml.py", line 323, in tokenize (line [pos:], lineno + 1, pos + 1))
networkx.exception.NetworkXError: cannot tokenize u'graph 'in (3, 1)