Reputation: 1033
I am trying to use google colab for Kaggle Competitions. However, everything went fine until I tried to download the data. I got 403 - Forbidden error. I am able to download other competition's data such as us-consumer-finance-complaints but not the LANL-Earthquake-Prediction data.
Initial Step: To move kaggle.json into the folder where the API expects to find it,
!mkdir -p ~/.kaggle/ && mv kaggle.json ~/.kaggle/ && chmod 600 ~/.kaggle/kaggle.json
When executing the following code in colab,
!kaggle competitions download -c LANL-Earthquake-Prediction
I got the following error message,
403 - Forbidden
I don't know what's wrong, but unable to download the data from Kaggle. Is there anyway we can resolve the problem?
Upvotes: 5
Views: 5587
Reputation: 470
I'm sorry I'm only seeing this 9 months later, but the solution I found was simple. So simple I got annoyed. Hopefully, someone else is spared the wasted hours.
You need to accept the rules of the competition first!
While logged in to Kaggle, go to the competition page and look at the menu tabs. You should see something like this:
Select the 'Rules' tab and click on 'I Understand and Accept':
You should be good to go now.
Upvotes: 16