Untar_data - urlsave() got an unexpected keyword argument 'timeout'

I’m currently on chapter 5 on google colab, was working through the textbook this morning and Untar_data was working fine.

Just booted it back up and was getting this error:

When I type in urlsave??, I get this (doesn’t have a timeout keyword arg)

However, looking at the fastcore/net.py in github, it does have a timeout keyword arg:

Is the issue with colab not being up to date with fastai fastcore? any way to update fastai on colab?

4 Likes

Experiencing exactly the same issue here. All of a sudden it doesn’t work.

Figured it out. Fastai got updated to 2.5, some functions are incompatible with it. type this in at the beginning:

!pip install --upgrade fastai==2.4.1

1 Like

It seems like I’m still getting the same error despite downgrading fastai to 2.4.1. I’m getting this: “fastbook 0.0.18 requires fastai>=2.5, but you’ll have fastai 2.4.1 which is incompatible.” Similar to your problem, I wasn’t getting this issue a week before. Any thoughts?

Hi everyone, I’m having the same issue, but for path = untar_data(URLs.MNIST_SAMPLE) in lesson 3. I tried the downgrading solution, but it didn’t help. I tried upgrading from 2.5 to 2.5.1, also didn’t help.
Always end up with the same error: TypeError: urlsave() got an unexpected keyword argument ‘timeout’

Anyone else have any thoughts?

I found a solution:

  • Go back to your folder view, open a terminal from your Jupyter instance and upgrade your fastai fastcore. In my case, I’m using paperspace gradient, so I only had to do the following commands:
    pip install fastai fastcore --upgrade
    git pull
  • Exit the jupyter terminal.
  • Then I deleted my existing notebook, not sure if that’s necessary, made a duplicate of the clean lesson notebook, and ran: path = untar_data(URLs.MNIST_SAMPLE).
  • It worked. No more timeout errors.
2 Likes

Gotcha - I guess it’s a bit different with colab vs paperspace

Also seems like the issue isn’t there anymore with colab. The original code works now.