I am following step by step in python the guide to update attribute values in a feed:
errors {
error_code {
field_mask_error: FIELD_MASK_MISSING
}
message: "Cannot use empty field mask in update operation."
location {
field_path_elements {
field_name: "operations"
index: 0
}
}
Yet my code runs smoothly but there seems to be some issues when I'm copying the update_mask. Here is my code
feed_item_operation = adwords_client.get_type("FeedItemOperation")
feed_item_service = adwords_client.get_service("FeedItemService")
adwords_client.copy_from(feed_item_operation.update, feed_item)
updated_feed_item = feed_item_operation.update
adwords_client.copy_from(updated_feed_item.attribute_values[x], all_attributes[x])
# Create a field mask using the old feed_item and the updated_feed_item.
adwords_client.copy_from(
feed_item_operation.update_mask,
protobuf_helpers.field_mask(feed_item._pb, updated_feed_item._pb),
)
Either there is something wrong in the documentation or I'm doing something wrong. How can my field_mask be missing when everything else is completely the same as in documentation.
Thank you.