'TypeError : 'NoneType' object is not callable (XLNet Classifer)
Solution 1:[1]
If you run the code you will first get this error:
ImportError:
XLNetTokenizer requires the SentencePiece library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/google/sentencepiece#installation and follow the ones
that match your environment
After running !pip install sentencepiece and restarting the cell the TypeError happens.
To fix this you need to restart your runtime. Click "Runtime -> Restart Runtime", then run your cells again.
I found this solution on the transformers repo in this issue report.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lomtrur |

