Fasttext exception error I'm trying to run language detection using Facebook's fastText through a Python script but I get this error when I load the model :


  Exception: fastText: Cannot load lid.176.bin due to C++ extension failed to allocate the memory


Any ideas? I've already installed all prerequisites and still get this error.
You are probably trying to load word vectors that are shared in the fasttext.cc website or are trying to load using models that are trained with the latest one on master. There is an issue in github with a lot of comments. One solution is to try to load from the text files the code for which is given here. I was able to work around this using java but had to train it in java only. Take a look at the examples in this package.

https://github.com/vinhkhuc/JFastText/tree/master/examples/api