lnresearch / topology

Data about the past and current structure of the Lightning Network
MIT License
83 stars 15 forks source link

bug: unexpected keyword argument when setting `--fmt=graphml` #17

Open DariusParvin opened 1 year ago

DariusParvin commented 1 year ago

Running timemachine restore with --fmt=json worked successfully, but when I tried with --fmt=graphml I got the following error:

$ python3 -m lntopo timemachine restore --fmt=graphml data/gossip-20220823.gsp 1639900800
Replaying gossip messages: 33246596it [06:51, 80835.47it/s] 
Pruning outdated channels: 100%|███████████████████████████████████████████████████| 741104/741104 [00:01<00:00, 722689.00it/s]
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/dariuscognac/Documents/GitHub/topology/lntopo/__main__.py", line 62, in <module>
    cli()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/Users/dariuscognac/Documents/GitHub/topology/lntopo/timemachine.py", line 150, in restore
    for line in nx.generate_graphml(g, named_key_ids=True, edge_id_from_attribute='scid'):
TypeError: generate_graphml() got an unexpected keyword argument 'edge_id_from_attribute'