IndexError: tuple index out of range in C2_W3_Assignment

When creating a post, please add:

  • Module: C2_W3_Assignment
  • Link to the classroom item you are referring to:

I’m trying to run the cell: context.build_data_docs() in Exercise 6 in the jupyter notebook, but the following IndexError is emerged, although that I configured S3_Site correctly:

Error running action with name update_data_docs
Traceback (most recent call last):
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/validation_operators/validation_operators.py”, line 476, in _run_actions
action_result = self.actions[name].run(
^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/checkpoint/actions.py”, line 101, in run
return self._run(
^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/checkpoint/actions.py”, line 1190, in run
self.data_context.build_data_docs(
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/core/usage_statistics/usage_statistics.py”, line 266, in usage_statistics_wrapped_method
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/data_context/data_context/abstract_data_context.py”, line 5318, in build_data_docs
return self.build_data_docs(
^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/data_context/data_context/abstract_data_context.py”, line 5365, in build_data_docs
index_page_resource_identifier_tuple = site_builder.build(
^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/render/renderer/site_builder.py”, line 322, in build
site_section_builder.build(resource_identifiers=resource_identifiers)
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/render/renderer/site_builder.py”, line 429, in build
source_store_keys = self.source_store.list_keys()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/data_context/store/store.py”, line 272, in list_keys
return [self.tuple_to_key(key) for key in keys_without_store_backend_id]
^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/data_context/store/store.py”, line 187, in tuple_to_key
return self.key_class.from_tuple(tuple
)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/coder/miniconda/lib/python3.12/site-packages/great_expectations/data_context/types/resource_identifiers.py”, line 155, in from_tuple
RunIdentifier.from_tuple((tuple
[-3], tuple
[-2])),
~~~~~~^^^^
IndexError: tuple index out of range

Hello @liamn0mad,

I couldn’t reproduce the issue, in fact I could successfully run context.build_data_docs() after I defined the great_expectations store list and just run cell 2.1 to get a new context. The issue could be in the great_expectations.yml when you edited it. However you should be able to run context.build_data_docs() with the default configuration to see that you get the local site link.

Note that I had to delete the gx folder then use get latest version to be able to create a new DataSource after a new lab session. Thank you

1 Like

Hello @Georgios

Thank you for your reply, After deleting gx directory and configuring the yaml files from the start it worked as expected.

Thank you

Liam

Blockquote

gx

1 Like