NameError: name 'CallbackHandler' is not defined

I set up a new instance on GCP.
I tried to run the code on “review-nlp-transfer” and I got an error [‘untar_data’ is not defined]
SoI followed the help in
(Name 'untar_data' is not defined)
which did not work. I then tried pulling the fast Ai again as per getting back to work instructions
sudo /opt/conda/bin/conda install -c fastai fastai

but now I am getting a ‘CallbackHandler’ is not defined

NameError                                 Traceback (most recent call last)
<ipython-input-8-55ea5f35b797> in <module>
----> 1 from fastai.text import *

/opt/conda/lib/python3.7/site-packages/fastai/text/ in <module>
----> 1 from .. import basics
     2 from ..basics import *
     3 from .learner import *
     4 from .data import *
     5 from .transform import *

/opt/conda/lib/python3.7/site-packages/fastai/ in <module>
----> 1 from .basic_train import *
     2 from .callback import *
     3 from .core import *
     4 from .basic_data import *
     5 from .data_block import *

/opt/conda/lib/python3.7/site-packages/fastai/ in <module>
    20 def loss_batch(model:nn.Module, xb:Tensor, yb:Tensor, loss_func:OptLossFunc=None, opt:OptOptimizer=None,
---> 21                cb_handler:Optional[CallbackHandler]=None)->Tuple[Union[Tensor,int,float,str]]:
    22     "Calculate loss and metrics for a batch, call out to callbacks as necessary."
    23     cb_handler = ifnone(cb_handler, CallbackHandler())

NameError: name 'CallbackHandler' is not defined

Can you check to see which version of fastai you’re using with fastai.__version__

Thanks Kevin for responding. the version is 1.0.61

Can you confirm that where you are doing from fastai.text import *?

try this:

import fastai

If so, can you also check your fastcore version. The other thought I have is maybe fastcore and fastai are maybe out of sync?

Dear Kevin
when I tried in a new notebook (in python[conda env:root]
import fastai

It gives me version 1.0.61

I then tried import fastcore
and the version is 1.3.20

Hey Ariel, I am not able to recreate the issues you are describing, but I’m wondering if it’s related to using conda and colab together? Can you share the process you are using to get conda installed with colab because I’m thinking that might have something to do with your issues. When I do this, it seems to work ok: