You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior: I expect a descriptive error message, similar to what happens for all other invalid sdtypes.
InvalidMetadataError: The following errors were found in the metadata:
Invalid sdtype : 'None' is not recognized. Please use one of the supported SDV sdtypes.
Observed Behavior:
TypeError: getattr(): attribute name must be string
Stack Trace
Currently observed stack trace.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-6-f10112f21d52>](https://localhost:8080/#) in <cell line: 1>()
----> 1 metadata.validate()
4 frames
[/usr/local/lib/python3.10/dist-packages/sdv/metadata/single_table.py](https://localhost:8080/#) in validate(self)
462 # Validate columns
463 for column, kwargs in self.columns.items():
--> 464 self._append_error(errors, self._validate_column, column, **kwargs)
465
466 if errors:
[/usr/local/lib/python3.10/dist-packages/sdv/metadata/single_table.py](https://localhost:8080/#) in _append_error(self, errors, method, *args, **kwargs)
440 """Inplace, append the produced error to the passed ``errors`` list."""
441 try:
--> 442 method(*args, **kwargs)
443 except InvalidMetadataError as e:
444 errors.append(e)
[/usr/local/lib/python3.10/dist-packages/sdv/metadata/single_table.py](https://localhost:8080/#) in _validate_column(self, column_name, sdtype, **kwargs)
144
145 def _validate_column(self, column_name, sdtype, **kwargs):
--> 146 self._validate_sdtype(sdtype)
147 self._validate_unexpected_kwargs(column_name, sdtype, **kwargs)
148 if sdtype == 'categorical':
[/usr/local/lib/python3.10/dist-packages/sdv/metadata/single_table.py](https://localhost:8080/#) in _validate_sdtype(self, sdtype)
137 is_default_sdtype = sdtype in self._SDTYPE_KWARGS
138 is_anonymized_type = sdtype in SDTYPE_ANONYMIZERS
--> 139 if not (is_default_sdtype or is_anonymized_type or is_faker_function(sdtype)):
140 raise InvalidMetadataError(
141 f"Invalid sdtype : '{sdtype}' is not recognized. Please use one of the "
[/usr/local/lib/python3.10/dist-packages/sdv/metadata/anonymization.py](https://localhost:8080/#) in is_faker_function(function_name)
57 """
58 try:
---> 59 getattr(Faker(), function_name)
60 except AttributeError:
61 return False
TypeError: getattr(): attribute name must be string
The text was updated successfully, but these errors were encountered:
Environment Details
Error Description
I expect that metadata validation should give me readable errors. Instead I get a
TypeError
if I accidentally input ansdtype
that is not a string.Steps to reproduce
Expected Behavior: I expect a descriptive error message, similar to what happens for all other invalid sdtypes.
Observed Behavior:
Stack Trace
Currently observed stack trace.
The text was updated successfully, but these errors were encountered: