erdogant / d3graph

Creation of interactive networks using d3 Javascript

Home Page:https://erdogant.github.io/d3graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_do_checks attempts to convert version strings to float

danielkentwood opened this issue · comments

In the _do_checks function from d3graph.py, there is an assert float(nx.__version__)>2. This is fine if the version only has two levels, but my current version of networkx is '2.8.8', so it throws:

ValueError: could not convert string to float: '2.8.8'

Consider changing to something like the following:

assert float('.'.join((nx.__version__).split('.')[:2]))>=2