# C4\_W1\_Assignment Loop:

**URL:** <https://community.deeplearning.ai/t/c4-w1-assignment-loop/361478>\
**Category:** NLP with Attention Models\
**Tags:** week-module-1\
**Created:** [June 22, 2023, 7:00pm UTC](https://community.deeplearning.ai/t/c4-w1-assignment-loop/361478 "2023-06-22T19:00:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaltun\_Osman](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@Kaltun\_Osman](https://community.deeplearning.ai/u/Kaltun_Osman)\
**Post date:** [June 22, 2023, 7:00pm UTC](https://community.deeplearning.ai/t/c4-w1-assignment-loop/361478/1 "2023-06-22T19:00:27Z")

</div>

ValueError: indices must have an integer type ???

I can’t really find where the problem is ?

---

<div class="post-metadata">

**Author:** ![Kaltun\_Osman](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@Kaltun\_Osman](https://community.deeplearning.ai/u/Kaltun_Osman)\
**Post date:** [June 22, 2023, 7:02pm UTC](https://community.deeplearning.ai/t/c4-w1-assignment-loop/361478/2 "2023-06-22T19:02:11Z")

</div>

Exercise 5 - train\_task\_function this one exactly

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [June 23, 2023, 7:24am UTC](https://community.deeplearning.ai/t/c4-w1-assignment-loop/361478/3 "2023-06-23T07:24:02Z")

</div>

The error tells you that when accessing list elements the indices must be integers, but you are not accessing any elements of a list in this exercise, perhaps you are using instead of () for appending elements to a list!
