title: AttributeError: 'DiGraph' object has no attribute '_node'
body: <p>The code is written by someone else using Python 2.7.12, networkx 1.11, numpy 1.13.0, scipy 0.18.1, matplotlib 2.0.2. It consists of several self-made modules. I have converted the entire code to Python 3.x using "2to3" converter. I am running the entire code using Spyder which has all the latest packages.</p>
  
  <p>Now while running the code I am getting <code>AttributeError: 'DiGraph' object has no attribute '_node'</code> error. Following is the error message in spyder.</p>
  
  <pre><code>runfile('C:/Users/NaVnEeT/Desktop/Thesis/WIP2/main.py', wdir='C:/Users/NaVnEeT/Desktop/Thesis/WIP2')
  __main__    : INFO     main() started
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  Settings    : INFO     Settings __init__ finished
  TransGrph   : INFO     Graph is loaded from file
  Traceback (most recent call last):
  
    File "&lt;ipython-input-1-c61da2f96623&gt;", line 1, in &lt;module&gt;
      runfile('C:/Users/NaVnEeT/Desktop/Thesis/WIP2/main.py', wdir='C:/Users/NaVnEeT/Desktop/Thesis/WIP2')
  
    File "C:\Users\NaVnEeT\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
      execfile(filename, namespace)
  
    File "C:\Users\NaVnEeT\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
  
    File "C:/Users/NaVnEeT/Desktop/Thesis/WIP2/main.py", line 137, in &lt;module&gt;
      main()
  
    File "C:/Users/NaVnEeT/Desktop/Thesis/WIP2/main.py", line 92, in main
      ch8NLR()
  
    File "C:\Users\NaVnEeT\Desktop\Thesis\WIP2\code\thesis\ch8NLR.py", line 176, in ch8NLR
      graph = TransportGraph(settings[0])
  
    File "C:\Users\NaVnEeT\Desktop\Thesis\WIP2\code\buildgraph\transportgraph.py", line 58, in __init__
      self.dmatrix = add_dmatrix(self.G, settings)
  
    File "C:\Users\NaVnEeT\Desktop\Thesis\WIP2\code\buildgraph\demandmatrix.py", line 20, in add_dmatrix
      origdest_graph = [x for x in G.nodes() if x[0] == 'F']
  
    File "C:\Users\NaVnEeT\Anaconda3\lib\site-packages\networkx\classes\graph.py", line 717, in nodes
      nodes = NodeView(self)
  
    File "C:\Users\NaVnEeT\Anaconda3\lib\site-packages\networkx\classes\reportviews.py", line 168, in __init__
      self._nodes = graph._node
  
  AttributeError: 'DiGraph' object has no attribute '_node'
  </code></pre>
  
  <p>I can provide the part of the code if required for a solution.</p>
  
  <p>Note: the code is running successfully with the old packages.</p>