title: Tensorflow 1.14, Fix : "google.protobuf.message.DecodeError": Error parsing message
body: <p>Protobuf v3.15 Error: google.protobuf.message.DecodeError, When using tf.graph(), loading TensorFlow model into memory. After changing tf.graph() snippet above into TensorFlow v2, same error was getting.</p>
  <p>I have tried protobuf 3.12.4(same on colabs), same error appeared</p>
  <pre><code>Traceback (most recent call last):
    File &quot;object_detection/webcam.py&quot;, line 25, in &lt;module&gt;
      od_graph_def.ParseFromString(serialized_graph)
  google.protobuf.message.DecodeError: Error parsing message
  [ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback
  
  </code></pre>
  <p>I have reinstalled different protobuf version and still same error is getting.</p>
  <p>I have trained a &quot;SSD MobileNet&quot; model using TensorFlow version 1.14 CPU for Webcam Object-detection with OpenCV. After installing required libraries of TensorFlow, I run model_builder_tf1.py and it successfully passed all 21 tests.</p>
  <p>Snippet:  to load TensorFlow model into memory using tf.graph()</p>
  <pre><code>detection_graph = tf.Graph()
  with detection_graph.as_default():
      od_graph_def = tf.compat.v1.GraphDef()
  with tf.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
      serialized_graph = fid.read()
      od_graph_def.ParseFromString(serialized_graph)
      tf.import_graph_def(od_graph_def, name='')
      sess = tf.compat.v1.Session(graph=detection_graph) 
  </code></pre>
  <p>Note that TensorFlow 1.14 is installed on conda environment.</p>
  <p>Using protobuf==3.8, another of error appeared</p>
  <p><code>AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key</code></p>
  <p>Can someone please give a solution to this problem.</p>