Creating DGL graph from networkx graph fails

I am unable to create a DGL graph from a networkx graph, I have done this for several other (networkx and even larger) graphs and they convert correctly. Can anyone please offer any advice in this regard. I have attached the screenshot of the error message below

Is it possible for you to provide some code/data for reproduction? The error message is not enough to figure out what’s going on.

Thanks for replying. I was able to fix it using
g = dgl.DGLGraph()
g.from_networkx(nxg)
instead of
g = DGLGraph(nxg) #this was the code that was raising the error I posted.
Also nxg is a networkx multigraph object. For some reason, this fixes it.

1 Like