Open renmi001 opened 5 years ago
I have the same error with you. Have you solved this problem yet? Could you help me?Thank you very much!
Maybe it's because the OS route path. Use os.path.join('graph','karate.edgelist') to define the input filename.
Maybe it's because the OS route path. Use os.path.join('graph','karate.edgelist') to define the input filename.
I try to import os module and modify the input filename to become os.path.join('graph','karate.edgelist'),but still have the same problem FileNotFoundError: [Errno 2] No such file or directory: 'graph\karate.edgelist'.
Use the absolute path instead or the relative one to discard problems with the path.
If you want relative path just change it like the image below. That happen because the main code runs on 'src' folder and not in root directory.
problem when running main.py: Traceback (most recent call last): File "D:/node2vec-master/src/main.py", line 104, in
main(args)
File "D:/node2vec-master/src/main.py", line 96, in main
nx_G = read_graph()
File "D:/node2vec-master/src/main.py", line 73, in read_graph
G = nx.read_edgelist(args.input, nodetype=int, create_using=nx.DiGraph())
File "<D:\Anaconda2\lib\site-packages\decorator.pyc:decorator-gen-170>", line 2, in read_edgelist
File "D:\Anaconda2\lib\site-packages\networkx\utils\decorators.py", line 198, in _open_file
fobj = _dispatch_dict[ext](path, mode=mode)
IOError: [Errno 2] No such file or directory: 'graph/karate.edgelist'
but the file exists,so please help me solve this question,thank you !![image](https://user-images.githubusercontent.com/49148700/56883577-ac9cab80-6a99-11e9-8843-bf4f89b45653.png)