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
>>> document_model = ProfilingResultsPageRenderer().render(validation_result)
An unexpected Exception occurred during data docs rendering. Because of this error, certain parts of data docs will not be rendered properly and/or may not appear altogether. Please use the trace, included in this message, to diagnose and repair the underlying issue. Detailed information follows:
TypeError: "Object of type Decimal is not JSON serializable". Traceback: "Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/great_expectations/render/renderer/column_section_renderer.py", line 110, in render
getattr(self, content_block_function_name)(evrs)
File "/usr/local/lib/python3.10/site-packages/great_expectations/render/renderer/column_section_renderer.py", line 388, in _render_value_counts_bar_chart
return get_renderer_impl(
File "/usr/local/lib/python3.10/site-packages/great_expectations/render/renderer/renderer.py", line 14, in inner_func
return renderer_fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/great_expectations/expectations/core/expect_column_distinct_values_to_be_in_set.py", line 334, in _descriptive_value_counts_bar_chart_renderer
chart = bars.to_json()
File "/usr/local/lib/python3.10/site-packages/altair/utils/schemapi.py", line 373, in to_json
dct = self.to_dict(validate=validate, ignore=ignore, context=context)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 2020, in to_dict
return super().to_dict(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 374, in to_dict
copy.data = _prepare_data(original_data, context)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 97, in _prepare_data
data = _consolidate_data(data, context)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 64, in _consolidate_data
name = _dataset_name(values)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 37, in _dataset_name
values_json = json.dumps(values, sort_keys=True)
File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Decimal is not JSON serializable
".
An unexpected Exception occurred during data docs rendering. Because of this error, certain parts of data docs will not be rendered properly and/or may not appear altogether. Please use the trace, included in this message, to diagnose and repair the underlying issue. Detailed information follows:
TypeError: "Object of type Decimal is not JSON serializable". Traceback: "Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/great_expectations/render/renderer/column_section_renderer.py", line 110, in render
getattr(self, content_block_function_name)(evrs)
File "/usr/local/lib/python3.10/site-packages/great_expectations/render/renderer/column_section_renderer.py", line 388, in _render_value_counts_bar_chart
return get_renderer_impl(
File "/usr/local/lib/python3.10/site-packages/great_expectations/render/renderer/renderer.py", line 14, in inner_func
return renderer_fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/great_expectations/expectations/core/expect_column_distinct_values_to_be_in_set.py", line 334, in _descriptive_value_counts_bar_chart_renderer
chart = bars.to_json()
File "/usr/local/lib/python3.10/site-packages/altair/utils/schemapi.py", line 373, in to_json
dct = self.to_dict(validate=validate, ignore=ignore, context=context)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 2020, in to_dict
return super().to_dict(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 374, in to_dict
copy.data = _prepare_data(original_data, context)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 97, in _prepare_data
data = _consolidate_data(data, context)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 64, in _consolidate_data
name = _dataset_name(values)
File "/usr/local/lib/python3.10/site-packages/altair/vegalite/v4/api.py", line 37, in _dataset_name
values_json = json.dumps(values, sort_keys=True)
File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Decimal is not JSON serializable
".
The text was updated successfully, but these errors were encountered:
Hey @tooptoop4 ! Are you able to provide any further context here? Workflow generating this error, your relevant configs? We're unable to investigate potential errors here without understanding how this behavior you're experiencing arose.
Background:
we want to do row-level validation so we configured include_unexpected_rows = True in the result_format. This will return all the columns of the unexpected rows. However, some columns are datetime, date and decimal which is not JSON Serializable.
Solution:
I have created a Pull Request to fix this. It would be nice if you can review it. Thanks! #6776
The text was updated successfully, but these errors were encountered: