Hello everyone,
in the tabular data model I can download the bluebook-for-bulldozers.zip into Path(’/root/.fastai/archive/bluebook’), but using file_extract to unzip it gives the following error:
@babak.jfard, I ran into this error too. Here’s how I worked around it:
If anything exists at ~/.fastai/archive/bluebook/, delete it.
Restart your notebook.
Immediately before the cell where you get the error, add a new cell with this code and execute it:
def file_extract(fname, dest=None):
"Extract `fname` to `dest` using `tarfile` or `zipfile`."
if dest is None: dest = Path(fname).parent
fname = str(fname)
if fname.endswith('gz'): tarfile.open(fname, 'r:gz').extractall(dest)
elif fname.endswith('zip'): zipfile.ZipFile(fname ).extractall(dest)
else: raise Exception(f'Unrecognized archive: {fname}')
This is the code from the old file_extract function in fastai.data.external. See here for when it disappeared in favor of fastdownload:
Now, you should be able to work through the notebook as usual.