liferoad commented on PR #34249:
URL: https://github.com/apache/beam/pull/34249#issuecomment-2797550005

   ```
   
   
   
   self = <apitools.base.protorpclite.messages.EnumField object at 
0x7945a7bebfa0> |  
     | value = 'BASIC' |  
     |   |  
     | def validate_element(self, value): |  
     | """Validate single element of field. |  
     |   |  
     | This is different from validate in that it is used on individual |  
     | values of repeated fields. |  
     |   |  
     | Args: |  
     | value: Value to validate. |  
     |   |  
     | Returns: |  
     | The value casted in the expected type. |  
     |   |  
     | Raises: |  
     | ValidationError if value is not expected type. |  
     | """ |  
     | if not isinstance(value, self.type): |  
     |   |  
     | # Authorize int values as float. |  
     | if isinstance(value, six.integer_types) and self.type == float: |  
     | return float(value) |  
     |   |  
     | if value is None: |  
     | if self.required: |  
     | raise ValidationError('Required field is missing') |  
     | else: |  
     | try: |  
     | name = self.name |  
     | except AttributeError: |  
     | raise ValidationError('Expected type %s for %s, ' |  
     | 'found %s (type %s)' % |  
     | (self.type, self.__class__.__name__, |  
     | value, type(value))) |  
     | else: |  
     | >                   raise ValidationError( |  
     | 'Expected type %s for field %s, found %s (type %s)' % |  
     | (self.type, name, value, type(value))) |  
     | E                   apitools.base.protorpclite.messages.ValidationError: 
Expected type <class 
'apache_beam.io.gcp.internal.clients.bigquery.bigquery_v2_messages.BigqueryTablesGetRequest.ViewValueValuesEnum'>
 for field view, found BASIC (type <class 'str'>) |  
     |  
   
   <br class="Apple-interchange-newline">
   ```
   
   Try to use 
apache_beam.io.gcp.internal.clients.bigquery.bigquery_v2_messages.BigqueryTablesGetRequest.ViewValueValuesEnum
 not the string.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to