title: Google's People API -- Issues Updating Contacts (Python)
body: <p>I have the resourceName and etag of the person I wish to update, but I can't understand the documentation to actually execute the update. </p>
  
  <p>I've looked at the API Documentation, and I feel like I'm structuring everything correctly. However, I keep getting Error 400 responses of two types:</p>
  
  <p>1)</p>
  
  <blockquote>
    <p>https://people.googleapis.com/v1/people/c1596007341306697743:updateContact?updatePersonFields=%7B%27emailAddresses%27%3A+%5B%7B%27value%27%3A+%27hello%40gmail.com%27%7D%5D%7D&amp;alt=json
    returned "Invalid value at 'update_person_fields'
    (type.googleapis.com/google.protobuf.FieldMask), Field
    'update_person_fields', Invalid FieldMask '{'emailAddresses':
    [{'value': 'hello@gmail.com'}]}'. Map keys should be represented as
    ["some_key"]."></p>
  </blockquote>
  
  <p>2)</p>
  
  <blockquote>
    <p>https://people.googleapis.com/v1/people/c1596007341306697743:updateContact?updatePersonFields=%7B%27emailAddresses%27%3A+%7B%27value%27%3A+%27hello%40gmail.com%27%7D%7D&amp;alt=json
    returned "Invalid updatePersonFields mask path: "{'email_addresses':
    {'value': 'hello@gmail.com'}}". Valid paths are documented at
    <a href="https://developers.google.com/people/api/rest/v1/people/updateContact" rel="nofollow noreferrer">https://developers.google.com/people/api/rest/v1/people/updateContact</a>."></p>
  </blockquote>
  
  <p>The first happens when the list brackets ([ ]) are left in the updatePersonFields parameter, the second when they are taken away.</p>
  
  <p>I'm doing my best to implement this entirely in Python, and succeeded with both looking at and creating contacts. It seems that the update call is somehow different than the others. Any and all input is welcomed and appreciated.</p>
  
  <pre><code>    profileCode = "people/blahblahblah" 
      accessToken = "%Eblahblahblah=" 
  
      update = API.people().updateContact(
          resourceName=profileCode,
          body={"resourceName":profileCode, "etag":accessToken},
          updatePersonFields={"emailAddresses":[{"value":"hello@gmail.com"}]}
          ).execute()
  </code></pre>