Getting KeyError when using glove embeddings

I am using both_embeddings which is the path to the glove file and embeddings_type as Glove. But when I use this I get the below error.

[2023-10-20 09:22:16,796 INFO] After filtering to vectors in vocab:
[2023-10-20 09:22:16,801 INFO] * enc: 7469 match, 11955 missing, (38.45%)
[2023-10-20 09:22:16,805 INFO] * dec: 7467 match, 11053 missing, (40.32%)
[2023-10-20 09:22:16,805 INFO]
Saving encoder embeddings as:

  • enc: data/run/sandhioutglove.enc_embeddings.pt
    Traceback (most recent call last):
    File “/usr/local/bin/onmt_train”, line 33, in
    sys.exit(load_entry_point(‘OpenNMT-py’, ‘console_scripts’, ‘onmt_train’)())
    File “/content/OpenNMT-py/onmt/bin/train.py”, line 67, in main
    train(opt)
    File “/content/OpenNMT-py/onmt/bin/train.py”, line 52, in train
    train_process(opt, device_id=0)
    File “/content/OpenNMT-py/onmt/train_single.py”, line 161, in main
    checkpoint, vocabs, transforms_cls = _init_train(opt)
    File “/content/OpenNMT-py/onmt/train_single.py”, line 106, in _init_train
    vocabs = prepare_transforms_vocabs(opt, transforms_cls)
    File “/content/OpenNMT-py/onmt/train_single.py”, line 48, in prepare_transforms_vocabs
    prepare_pretrained_embeddings(opt, vocabs)
    File “/content/OpenNMT-py/onmt/modules/embeddings.py”, line 419, in prepare_pretrained_embeddings
    torch.save(convert_to_torch_tensor(src_vectors, enc_vocab), enc_output_file)
    File “/content/OpenNMT-py/onmt/modules/embeddings.py”, line 347, in convert_to_torch_tensor
    tensor[vocab.tokens_to_ids[word]] = torch.Tensor(values)
    KeyError: ‘rAjaXAni’

Any help in this regard would be of great help.