-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: automlIssues related to the AutoML API.Issues related to the AutoML API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
The problematic line is at:
google-cloud-python/automl/google/cloud/automl_v1beta1/tables/tables_client.py
Lines 402 to 405 in bd5318a
| elif type_code == data_types_pb2.ARRAY: | |
| return {"list_value": value} | |
| elif type_code == data_types_pb2.STRUCT: | |
| return {"struct_value": value} |
The expected type of the array/struct is google.protobuf.ListValue/google.protobuf.StructValue, not Python list/dictionary.
The failure message is:
*** TypeError: Parameter to MergeFrom() must be instance of same class: expect ed google.protobuf.ListValue got list.
Preferably we should only support Python list/dictionary. Now for backwards compatibility, we should support list/dictionary/google.protobuf.ListValue/google.protobuf.StructValue
Metadata
Metadata
Assignees
Labels
api: automlIssues related to the AutoML API.Issues related to the AutoML API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.