# TypeError: Cannot read properties of undefined (reading 'start')

**URL:** <https://support.prodi.gy/t/typeerror-cannot-read-properties-of-undefined-reading-start/5172>\
**Category:** Uncategorized\
**Tags:** usage, custom, solved, relations\
**Created:** [January 9, 2022, 12:17pm UTC](https://support.prodi.gy/t/typeerror-cannot-read-properties-of-undefined-reading-start/5172 "2022-01-09T12:17:45Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![ocelot43](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@ocelot43](https://support.prodi.gy/u/ocelot43)\
**Post date:** [January 13, 2022, 1:52am UTC](https://support.prodi.gy/t/typeerror-cannot-read-properties-of-undefined-reading-start/5172/7 "2022-01-13T01:52:25Z")

</div>

Hi @ljvmiranda921, sorry for reply late, I was busy with other things and forgot to check the progress here. As you said, these values take the **token index** , **not the character index**. I have fix the bug when I replace character index with token index. Everything works fine now. And in case you might need it, the vocab.txt is the same as the "bert-base-cased" in huggingface transformers. Thanks again for you advice and I will try to write a "validator" to check the input data next time.

---

_[View the full topic](https://support.prodi.gy/t/typeerror-cannot-read-properties-of-undefined-reading-start/5172)._
