Segmentation fault with vocab.py

Helo dears,

I’m trying to load pre-training mode as bellow code:

url = 'https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.ar.vec'
SRC.build_vocab(train_data, vectors=Vectors('wiki.ar.vec', url=url), unk_init = torch.Tensor.normal_, min_freq = 2) 
TRG.build_vocab(train_data, min_freq = 2)

I get an unusual error like :

Fatal Python error: Segmentation fault

Current thread 0x00007f054de01740 (most recent call first):
File "/home/aiman/anaconda3/lib/python3.7/site-packages/torchtext/vocab.py", line 387 in cache
File "/home/aiman/anaconda3/lib/python3.7/site-packages/torchtext/vocab.py", line 323 in __init__
File "test.py", line 101 in <module>

I have update torchtext and conda but still not fix.

The environment as bellow:

pytorch-ignite==0.4.2
pytorch-nlp==0.5.0
torch==1.4.0
torchaudio==0.4.0a0+719bcc7
torchtext==0.6.0
torchvision==0.5.0

Any suggestions to fix this issue?

Any support to fix this issue? :slight_smile:

Could you update all libs to the latest stable release and retry the code?
If you are still seeing the seg fault, please create an issue in the torchtext GitHub repository.

The problem with torchtext version 1.4.0. I have updated it to version 1.5.0. and the issue is fixed.