# Debugging submission failures - Module 3, Exercise 3

**URL:** <https://community.deeplearning.ai/t/debugging-submission-failures-module-3-exercise-3/884774>\
**Category:** Fine-tuning & RL for LLMs: Intro to Post-training\
**Tags:** week-module-3, dl-ai-learning-platform\
**Created:** [December 10, 2025, 3:40am UTC](https://community.deeplearning.ai/t/debugging-submission-failures-module-3-exercise-3/884774 "2025-12-10T03:40:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepLearningStudent](https://avatars.discourse-cdn.com/v4/letter/d/7ba0ec/32.png) [@deepLearningStudent](https://community.deeplearning.ai/u/deepLearningStudent)\
**Post date:** [December 10, 2025, 3:40am UTC](https://community.deeplearning.ai/t/debugging-submission-failures-module-3-exercise-3/884774/1 "2025-12-10T03:40:30Z")

</div>

Hi there,

I’m trying to understand why my submission is failing on Module 3, Exercise 3. Specifically, I have added my code to the `_create_training_embeddings` and `_calculate_similarity_and_select_indices` functions and can successfully run the subsequent cell (the one starting with

```auto
# Identify error patterns from your analysis
print(“Creating training examples from train set based on error patterns…”)

```

However, when I submit the notebook for grading, I am not getting any points and get the following error:

```auto
Overall Score: 0.00 (0.0/1 exercises) 
Exercise Results: FAIL ex3: 0.00 - Passed 0/1 tests - 
Function execution failed: list indices must be integers or slices, not str 
FAILED! Overall score 0.00 was below 0.70 
Focus on the exercises marked with FAIL above.

```

My question is, how do I isolate the issue? There are two code blocks I have modified, and only one test so I’m not sure what this is testing.

Thanks.

---

<div class="post-metadata">

**Author:** ![bong.seog.choi](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@bong.seog.choi](https://community.deeplearning.ai/u/bong.seog.choi)\
**Post date:** [January 22, 2026, 5:38pm UTC](https://community.deeplearning.ai/t/debugging-submission-failures-module-3-exercise-3/884774/2 "2026-01-22T17:38:48Z")

</div>

It’s hard to pinpoint the exact issue without seeing your code, but the error “list indices must be integers or slices, not str” means you’re trying to use a string to access an item in a list.

This usually happens when a function returns a list of dictionaries. Even if that list only contains one item, it is still a list, not the dictionary itself. A common mistake is trying to access a key directly, like mylist[“mykey”], when you actually need to specify the index first, like mylist[0][“mykey”].
