fairseq
fairseq copied to clipboard
cannot unpack non-iterable NoneType object on loading camemBERT
🐛 Bug
When I try to load the model on google colab :
import torch camembert = torch.hub.load('pytorch/fairseq','camembert')
I get this error on loading :
Using cache found in /root/.cache/torch/hub/pytorch_fairseq_main
TypeError: cannot unpack non-iterable NoneType object
Anyone knows how to troubleshoot ?
Before having this error, I had two others while following camemBERT's documentation : missing hydra-core and missing bitarray. Fixed them by installing the correct packages.
I got the same error after installing hydra-core and bitarray. Restarting the python kernel revealed that other packages were missing as well. After installing the new pip package, and rerunning, I got the TypeError: cannot unpack non-iterable NoneType object
again. I then had to restart the kernel again. After a few cycles of installing a missing dependency and restarting the kernel, the problem resolved.
As @ChristianHinge said, please try restarting python kernel and see if there is a different output.
1835 2023-05-28 18:04:26 root pip install tensorboardX 1889 2023-05-28 18:39:47 root pip install soundfile 1902 2023-05-28 18:49:17 root pip install editdistance 1906 2023-05-28 18:50:45 root pip install hydra-core