Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download data set into Colab? Stuck with a problem, it says "401 - Unauthorized"?

I am trying to download Boat Dataset from Kaggle[ https://www.kaggle.com/clorichel/boat-types-recognition]. For downloading dataset I am using, the code: !pip install -U -q kaggle !mkdir -p ~/.kaggle !echo '{"username":"{user}","key":"{API key"}' > ~/.kaggle/kaggle.json !chmod 600 ~/.kaggle/kaggle.json !mkdir -p data !kaggle datasets download -d clorichel/boat-types-recognition -p ./data But I am unable to download it into colab, I am getting error, "401 - Unauthorized". How may, I resolve the issue or is there any other best way to do so?

like image 879
Sarah LK Avatar asked Nov 19 '25 05:11

Sarah LK


1 Answers

Do generate new API Token from your kaggle account ,it may have expired in past. And put it into any of your google drive folder ,in google colab set your current working directory as that folder, and then visit the kaggle ,copy API command and with "!+ API command" without quotes in google colab you will be able to download it.

like image 58
Shubham Bhawsar Avatar answered Nov 21 '25 10:11

Shubham Bhawsar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!