OpenVINO™ Toolkit AttributeError: 'Graph' object has no attribute 'node'


Error Messages



Note This issue has been fixed,  be sure to update your OpenVINO toolkit to the latest release.

What are you seeing?

Model Optimizer version:     2019.3.0-375-g332562022
[ ERROR ]  -------------------------------------------------
[ ERROR ]  ----------------- INTERNAL ERROR ----------------
[ ERROR ]  Unexpected exception happened.
[ ERROR ]  Please contact Model Optimizer developers and forward the following information:
[ ERROR ]  'Graph' object has no attribute 'node'
[ ERROR ]  Traceback (most recent call last):
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/", line 302, in main
    return driver(argv)
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/", line 261, in driver
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/pipeline/", line 65, in driver
    graph, original_shapes = loader.caffe_pb_to_nx(proto, model)
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/front/caffe/", line 294, in caffe_pb_to_nx
    graph.add_node(, pb=layer, model_pb=model_layer, kind='op', type='Parameter')
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/graph/", line 505, in add_node
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/graph/", line 470, in update_node
    in_ports_count = self.in_ports_count if self.has_valid('in_ports_count') else None
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/graph/", line 161, in has_valid
    return self.has(k) and not self.graph.node[self.node][k] is None
  File "/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer/mo/graph/", line 158, in has
    return k in self.graph.node[self.node]
AttributeError: 'Graph' object has no attribute 'node'

[ ERROR ]  ---------------- END OF BUG REPORT --------------
[ ERROR ]  -------------------------------------------------


Why are you seeing it?

There is a compatibility issue with the model optimizer and the Python* NetworkX package version 2.4. 

How to fix it:

Install the Python* NetworkX version 2.3 by running the following command.

pip3 install networkx==2.3