default factory changed?
EtienneGagnon1 opened this issue · 2 comments
EtienneGagnon1 commented
I think the default_factory attribute of the Graph() has been changed from List to default_dict? When I try to load an edgelist now this error appears:
Traceback (most recent call last):
File "C:\Users\Etienne Gagnon\Anaconda3\envs\modified_deepwalk\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Etienne Gagnon\Anaconda3\envs\modified_deepwalk\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Etienne Gagnon\PycharmProjects\modified_deepwalk\mod_deepwalk\__main__.py", line 186, in <module>
sys.exit(main())
File "C:\Users\Etienne Gagnon\PycharmProjects\modified_deepwalk\mod_deepwalk\__main__.py", line 182, in main
process(args)
File "C:\Users\Etienne Gagnon\PycharmProjects\modified_deepwalk\mod_deepwalk\__main__.py", line 66, in process
G = graph.load_edgelist(args.input, undirected=args.undirected)
File "C:\Users\Etienne Gagnon\PycharmProjects\modified_deepwalk\mod_deepwalk\graph.py", line 290, in load_edgelist
G[x].append(y)
AttributeError: 'collections.defaultdict' object has no attribute 'append'
GTmac commented
It should still be List: https://github.com/phanein/deepwalk/blob/master/deepwalk/graph.py#L32 is there any chance you are not using the original graph.py?
EtienneGagnon1 commented
Yeah I did some modifications a long time ago seems like it is on my end.