jinhongjung/pyrwr

Error found when trying to execute rwr.read_graph(input_graph, graph_type)

Closed this issue · 1 comments

I was trying to execute train_WGCN.py from this repository this error appeared. I execute the code through Anaconda environment.

My setup:

Operating System: Windows 10
Conda version: 4.10.3
Python version: 3.6.13

Using backend: pytorch
Traceback (most recent call last):
  File "train_WGCN.py", line 79, in <module>
    structural_info = compute_structural_infot(args.dataset, args.directed, args.dijkstra_k, args.in_out_ratio,args.restart_rate,args.in_out_peak)
  File "D:\Git\WGCN_Graph-Convolutional-Networks-with-Weighted-Structural-Features\utils_structural.py", line 50, in compute_structural_infot
    rwr.read_graph(input_graph, graph_type)
  File "E:\anaconda3\envs\wgcn\lib\site-packages\pyrwr-1.0.0-py3.6.egg\pyrwr\pyrwr.py", line 25, in read_graph
    self.A, self.base = reader.read_graph(input_path, graph_type)
  File "E:\anaconda3\envs\wgcn\lib\site-packages\pyrwr-1.0.0-py3.6.egg\utils\reader.py", line 77, in read_graph
    X = np.loadtxt(path, dtype=float, comments='#')
  File "E:\anaconda3\envs\wgcn\lib\site-packages\numpy\lib\npyio.py", line 968, in loadtxt
    fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
  File "E:\anaconda3\envs\wgcn\lib\site-packages\numpy\lib\_datasource.py", line 269, in open
    return ds.open(path, mode, encoding=encoding, newline=newline)
  File "E:\anaconda3\envs\wgcn\lib\site-packages\numpy\lib\_datasource.py", line 623, in open
    raise IOError("%s not found." % path)
OSError: data\cora_ml\out1_graph_edges_rwr.txt not found.

The error shows that rwr.read_graph(input_graph, graph_type) function is not successfully executed.

What might be the problem? Thanks in advance

Sorry for the late reply. Check your data path as warned by the last sentence (OSError: data\cora_ml\out1_graph_edges_rwr.txt not found.)