Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

09_tabular.ipynb: NameError: name 'file_extract' is not defined #468

Closed
erg opened this issue Sep 9, 2021 · 4 comments
Closed

09_tabular.ipynb: NameError: name 'file_extract' is not defined #468

erg opened this issue Sep 9, 2021 · 4 comments

Comments

@erg
Copy link

erg commented Sep 9, 2021

When running notebook 9, there's no file_extract function.

NameError                                 Traceback (most recent call last)
/tmp/ipykernel_77010/3628020118.py in <module>
      2     path.mkdir(parents=true)
      3     api.competition_download_cli('bluebook-for-bulldozers', path=path)
----> 4     file_extract(path/'bluebook-for-bulldozers.zip')
      5 
      6 path.ls(file_type='text')

NameError: name 'file_extract' is not defined

You can fix it manually:

cd ~/.fastai/archive/bluebook
unzip bluebook-for-bulldozers.zip
@RCristyan
Copy link

Thank you very much!

For some weird reason, this exact command did not work on google colab because unzip could not find the file... But with this command, it worked just fine:

!unzip /root/.fastai/archive/bluebook/bluebook-for-bulldozers.zip -d /root/.fastai/archive/bluebook

@jquintanilla4
Copy link

Thank you! x10000

I've spent the better part of an hour trying to fix this issue. After I rewrote the python to make the downloading part of the if statement work properly... For anyone using gradient paperspace and reads this in the near future. Run the cd and unzip commands in a jupyter terminal, not in the notebook.

@mone27
Copy link

mone27 commented Jan 15, 2022

I had the same issues, and I have solved it by manually defining the file_extract function in the notebook.
I have taken the function from https://github.com/fastai/fastai2/blob/f9231256e2a8372949123bda36e44cb0e1493aa2/fastai2/data/external.py#L215, which contains a working version of the function (and in my understanding what was valid at the time the book was written).
For me in this way the whole notebook is working

@miwojc
Copy link
Contributor

miwojc commented Apr 25, 2022

This can be closed @jph00
Fixed in 111e6c5

@jph00 jph00 closed this as completed Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants