fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

cannot unpack non-iterable NoneType object on loading camemBERT

Open mathayay opened this issue 2 years ago • 3 comments

🐛 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.

mathayay avatar Feb 03 '23 18:02 mathayay

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.

ChristianHinge avatar Mar 27 '23 11:03 ChristianHinge

As @ChristianHinge said, please try restarting python kernel and see if there is a different output.

Chord-Chen-30 avatar Apr 19 '23 13:04 Chord-Chen-30

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

hebochang avatar May 28 '23 11:05 hebochang