2

When migrating from networkx version 1.1 to 2.0 I have encountered an issue regarding networkx.read_gpickle function.

In version 1.1 the returned value is a Graph object containing 'edge', 'adj' and 'node' attributes. Whereas in version 2.0 the same function returns a Graph object containing only the 'edge' attribute.

When calling len(network.nodes()) the following error is produced:

{AttributeError}'Graph' object has no attribute '_node'

Is there a way to obtain obtain the 'node' attribute as well in version 2.0?

m00am
  • 5,910
  • 11
  • 53
  • 69
Dan
  • 21
  • 1

1 Answers1

0

For people also bumped into this problem, here is the answer from networkx github:

networkx 1.1 vs 2.0 gpickle

In short, it's not compatible.

pppk520
  • 517
  • 4
  • 15