I did it manually, I just downloaded the bluebook-for-bulldozers.zip file, and loaded in the VM at storage/archive/bluebook, then from the terminal in the bluebook folder I ran unzip bluebook-for-bulldozers.zip and it worked.
But I would really like to learn how to do it using just the code shown in the jupyter notebook.
I believe you removed the screen because of the api keys but i believe the whole section with the call was wrapped with if not path.exists(). If the path existed before, and you mentioned you also downloaded it manually, the code didn’t run, you didn’t send api request. Just try to run it without checking for path and see what error message you get.
What i meant is to remove the indentation before api.competition_download_cli and file_extract. Now it only runs if there is no path already created. If you created the path before running this cell it just didn’t send api request.
Ah, great, now i see. I see you accepted the terms so my best guess is the location of your kaggle.json. The default expected location is ~/.kaggle (mind the dot!). After downloading the file, from the location of the file run this and try again:
ok, if you want to troubleshoot in the future make sure the ~/.kaggle/kaggle.json exists (you do not have to provide credentials in any other way, now i’m thinking that maybe you created environment variables as in the first screenshot you shared so running unset KAGGLE_USERNAME and unset KAGGLE_KEY could help) and you can run this to test if you still get 401 error:
from kaggle import api
I’m having a similar problem to @ricardocalleja - getting an error “ApiException: (401) Reason: Unauthorised” when I try to download the bulldozers data.
I originally tried to pip install kaggle before reading on to rest of the notebook, and followed instructions online to add kaggle.json to .kaggle folder, which might have messed with the fastbook code somewhat.
A terminal search revealed that I do indeed have the kaggle.json file in .kaggle and I have run chmod 600 so hopefully permissions are correct.
Just after posting, I realised I should try manually downloading data like @ricardocalleja suggested - and that did indeed work, I navigated to ‘bluebook’ folder then ran line kaggle competitions download -c bluebook-for-bulldozers from kaggle website.
So I’m sorted, but would be interested to know what was wrong, and maybe it will help others, so thought I’d keep this up. (let me know if better to take down!)