# KeyError: "Invalid key: slice(0, 1000, None). Please first select a split

**URL:** <https://discuss.huggingface.co/t/keyerror-invalid-key-slice-0-1000-none-please-first-select-a-split/9089>\
**Category:** Beginners\
**Created:** [August 9, 2021, 1:11pm UTC](https://discuss.huggingface.co/t/keyerror-invalid-key-slice-0-1000-none-please-first-select-a-split/9089 "2021-08-09T13:11:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anon58275033](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@anon58275033](https://discuss.huggingface.co/u/anon58275033)\
**Post date:** [August 16, 2021, 9:24am UTC](https://discuss.huggingface.co/t/keyerror-invalid-key-slice-0-1000-none-please-first-select-a-split/9089/3 "2021-08-16T09:24:42Z")

</div>

Hi, thanks for that - it works! I am now coming across this error, sadly:

> [@\[HELP\] RuntimeError: CUDA error - when training my model?](https://discuss.huggingface.co/t/help-runtimeerror-cuda-error-when-training-my-model/9231):
>
> Hello everyone, I am encountering an error when training my language model from scratch, having trained a tokenizer beforehand. I have just trained my tokenizer from scratch on a WordPiece model like BERT, following this notebook: [notebooks/tokenizer\_training.ipynb at master · huggingface/notebooks · GitHub](https://github.com/huggingface/notebooks/blob/master/examples/tokenizer_training.ipynb) I then saved my model using this code: new\_tokenizer.save\_pretrained("/content/drive/MyDrive/my-new-tokenizer") Thus, the folder structure of my-new-tokenizer looks something like this: …

---

_[View the full topic](https://discuss.huggingface.co/t/keyerror-invalid-key-slice-0-1000-none-please-first-select-a-split/9089)._
