title: Error while trying to serialise Google NLP API Response using Protobuf using Python
body: <p>I am trying to pass the response of Google's NLP API to Google's Protobuf on my GCP VM. I keep getting the following response:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/app/scrapers_v3/utils/google_nlp.py", line 53, in get_entities_from_text
      element = json_format.MessageToDict(entity)
    File "/usr/local/lib/python3.7/site-packages/google/protobuf/json_format.py", line 168, in MessageToDict
      return printer._MessageToJsonObject(message)
    File "/usr/local/lib/python3.7/site-packages/google/protobuf/json_format.py", line 204, in _MessageToJsonObject
      return self._RegularMessageToJsonObject(message, js)
    File "/usr/local/lib/python3.7/site-packages/google/protobuf/json_format.py", line 240, in _RegularMessageToJsonObject
      js[name] = self._FieldToJsonObject(field, value)
    File "/usr/local/lib/python3.7/site-packages/google/protobuf/json_format.py", line 282, in _FieldToJsonObject
      if field.file.syntax == 'proto3':
  AttributeError: 'NoneType' object has no attribute 'syntax'
  
  </code></pre>
  
  <p>The value <code>entity</code> is an element of <code>[json_format.MessageToDict(entity) for entity in response.entities]</code>.</p>
  
  <p>Interestingly the same code runs properly on my local machine.</p>
  
  <ul>
  <li>google-cloud-language version: 1.0.2</li>
  <li>Protobuf version: 3.10.0</li>
  </ul>