Hi - I’m new to GX and I’m following the Getting Started tutorial. I’m getting KeyError at step 3 that I cannot find help for it online and was wondering if someone can help me here. Attaching the Traceback
KeyError Traceback (most recent call last)
Cell In[3], line 1
----> 1 result = context.assistants.onboarding.run(
2 batch_request=batch_request,
3 exclude_column_names=exclude_column_names,
4 )
5 validator.expectation_suite = result.get_expectation_suite(
6 expectation_suite_name=expectation_suite_name
7 )
File <makefun-gen-0>:2, in run(batch_request, estimation, include_column_names, exclude_column_names, include_column_name_suffixes, exclude_column_name_suffixes, semantic_type_filter_module_name, semantic_type_filter_class_name, max_unexpected_values, max_unexpected_ratio, min_max_unexpected_values_proportion, allowed_semantic_types_passthrough, cardinality_limit_mode, max_unique_values, max_proportion_unique, table_rule, column_value_uniqueness_rule, column_value_nullity_rule, column_value_nonnullity_rule, numeric_columns_rule, datetime_columns_rule, text_columns_rule, categorical_columns_rule)
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/rule_based_profiler/data_assistant/data_assistant_runner.py:172, in DataAssistantRunner.run_impl.<locals>.run(batch_request, estimation, **kwargs)
162 variables_directives_list: List[
163 RuntimeEnvironmentVariablesDirectives
164 ] = build_variables_directives(
(...)
167 **variables_directives_kwargs,
168 )
169 domain_type_directives_list: List[
170 RuntimeEnvironmentDomainTypeDirectives
171 ] = build_domain_type_directives(**domain_type_directives_kwargs)
--> 172 data_assistant_result: DataAssistantResult = data_assistant.run(
173 variables_directives_list=variables_directives_list,
174 domain_type_directives_list=domain_type_directives_list,
175 )
176 return data_assistant_result
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/rule_based_profiler/data_assistant/data_assistant.py:538, in DataAssistant.run(self, variables, rules, variables_directives_list, domain_type_directives_list)
532 batches = {}
534 data_assistant_result = DataAssistantResult(
535 _batch_id_to_batch_identifier_display_name_map=self._batch_id_to_batch_identifier_display_name_map(),
536 _usage_statistics_handler=usage_statistics_handler,
537 )
--> 538 run_profiler_on_data(
539 data_assistant=self,
540 data_assistant_result=data_assistant_result,
541 profiler=self._profiler,
542 variables=variables,
543 rules=rules,
544 batch_list=list(batches.values()),
545 batch_request=None,
546 variables_directives_list=variables_directives_list,
547 domain_type_directives_list=domain_type_directives_list,
548 )
549 return self._build_data_assistant_result(
550 data_assistant_result=data_assistant_result
551 )
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/util.py:223, in measure_execution_time.<locals>.execution_time_decorator.<locals>.compute_delta_t(*args, **kwargs)
221 time_begin: float = (getattr(time, method))()
222 try:
--> 223 return func(*args, **kwargs)
224 finally:
225 time_end: float = (getattr(time, method))()
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/rule_based_profiler/data_assistant/data_assistant.py:726, in run_profiler_on_data(data_assistant, data_assistant_result, profiler, variables, rules, batch_list, batch_request, variables_directives_list, domain_type_directives_list)
720 rules_configs: Optional[Dict[str, Dict[str, Any]]] = {
721 rule.name: rule.to_json_dict() for rule in rules
722 }
723 comment: str = f"""Created by effective Rule-Based Profiler of {data_assistant.__class__.__name__} with the \
724 configuration included.
725 """
--> 726 rule_based_profiler_result: RuleBasedProfilerResult = profiler.run(
727 variables=variables,
728 rules=rules_configs,
729 batch_list=batch_list,
730 batch_request=batch_request,
731 recompute_existing_parameter_values=False,
732 reconciliation_directives=DEFAULT_RECONCILATION_DIRECTIVES,
733 variables_directives_list=variables_directives_list,
734 domain_type_directives_list=domain_type_directives_list,
735 comment=comment,
736 )
737 result: DataAssistantResult = data_assistant_result
738 result.profiler_config = profiler.config
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/core/usage_statistics/usage_statistics.py:304, in usage_statistics_enabled_method.<locals>.usage_statistics_wrapped_method(*args, **kwargs)
301 if args_payload_fn is not None:
302 nested_update(event_payload, args_payload_fn(*args, **kwargs))
--> 304 result = func(*args, **kwargs)
305 message["success"] = True
306 except Exception:
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/rule_based_profiler/rule_based_profiler.py:323, in BaseRuleBasedProfiler.run(self, variables, rules, batch_list, batch_request, recompute_existing_parameter_values, reconciliation_directives, variables_directives_list, domain_type_directives_list, comment)
314 rule: Rule
315 for rule in pbar_method(
316 effective_rules,
317 desc="Generating Expectations:",
(...)
321 bar_format="{desc:25}{percentage:3.0f}%|{bar}{r_bar}",
322 ):
--> 323 rule_state = rule.run(
324 variables=effective_variables,
325 batch_list=batch_list,
326 batch_request=batch_request,
327 recompute_existing_parameter_values=recompute_existing_parameter_values,
328 reconciliation_directives=reconciliation_directives,
329 rule_state=RuleState(),
330 )
331 self.rule_states.append(rule_state)
333 return RuleBasedProfilerResult(
334 fully_qualified_parameter_names_by_domain=self.get_fully_qualified_parameter_names_by_domain(),
335 parameter_values_for_fully_qualified_parameter_names_by_domain=self.get_parameter_values_for_fully_qualified_parameter_names_by_domain(),
(...)
361 _usage_statistics_handler=self._usage_statistics_handler,
362 )
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/util.py:223, in measure_execution_time.<locals>.execution_time_decorator.<locals>.compute_delta_t(*args, **kwargs)
221 time_begin: float = (getattr(time, method))()
222 try:
--> 223 return func(*args, **kwargs)
224 finally:
225 time_end: float = (getattr(time, method))()
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/great_expectations/rule_based_profiler/rule/rule.py:138, in Rule.run(self, variables, batch_list, batch_request, recompute_existing_parameter_values, reconciliation_directives, rule_state)
135 pbar_method: Callable = determine_progress_bar_method_by_environment()
137 domain: Domain
--> 138 for domain in pbar_method(
139 domains,
140 desc="Profiling Dataset:",
141 position=1,
142 leave=False,
143 bar_format="{desc:25}{percentage:3.0f}%|{bar}{r_bar}",
144 ):
145 rule_state.initialize_parameter_container_for_domain(domain=domain)
147 parameter_builders: List[ParameterBuilder] = self.parameter_builders or []
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/tqdm/notebook.py:259, in tqdm_notebook.__iter__(self)
257 try:
258 it = super(tqdm_notebook, self).__iter__()
--> 259 for obj in it:
260 # return super(tqdm...) will not catch exception
261 yield obj
262 # NB: except ... [ as ...] breaks IPython async KeyboardInterrupt
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/tqdm/std.py:1210, in tqdm.__iter__(self)
1208 finally:
1209 self.n = n
-> 1210 self.close()
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/tqdm/notebook.py:293, in tqdm_notebook.close(self)
291 self.disp(bar_style='success', check_delay=False)
292 else:
--> 293 self.disp(close=True, check_delay=False)
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/tqdm/notebook.py:192, in tqdm_notebook.display(self, msg, pos, close, bar_style, check_delay)
190 if close and pbar.bar_style != 'danger': # hide only if no error
191 try:
--> 192 self.container.close()
193 except AttributeError:
194 self.container.visible = False
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:500, in Widget.close(self)
498 if self.comm is not None:
499 Widget._active_widgets.pop(self.model_id, None)
--> 500 self.comm.close()
501 self.comm = None
502 self._repr_mimebundle_ = None
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/comm/base_comm.py:109, in BaseComm.close(self, data, metadata, buffers, deleting)
101 self.publish_msg(
102 "comm_close",
103 data=data,
104 metadata=metadata,
105 buffers=buffers,
106 )
107 if not deleting:
108 # If deleting, the comm can't be registered
--> 109 comm.get_comm_manager().unregister_comm(self)
File ~/.virtualenvs/ge_discovery/lib/python3.9/site-packages/comm/base_comm.py:199, in CommManager.unregister_comm(self, comm)
197 """Unregister a comm, and close its counterpart"""
198 # unlike get_comm, this should raise a KeyError
--> 199 comm = self.comms.pop(comm.comm_id)
KeyError: 'cea6fe98f8a942b3b9448468cf53de63'