question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

kaggle api returns 401 - Unauthorized

See original GitHub issue

I can’t download kaggle data via kaggle api, either on local and on google colab. I can download data on kaggle GUI, which means I successfully enrolled in the competition.

I followed the procedure on https://github.com/Kaggle/kaggle-api to use kaggle api.

Here are information on my environment.

ls /Users/.kaggle/
# ls /Users/.kaggle/
# kaggle.json
ls -l /Users/.kaggle/
# total 8
# -rw-r--r--@ 1 root  admin  64  6 26 18:59 kaggle.json
kaggle competitions list
# 401 - Unauthorized
kaggle competitions download -c global-wheat-detection
# 401 - Unauthorized
pip show kaggle
# Name: kaggle
# Version: 1.5.6
# Summary: Kaggle API
# Home-page: https://github.com/Kaggle/kaggle-api
# Author: Kaggle
# Author-email: support@kaggle.com
# License: Apache 2.0
# Location: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
# Requires: python-dateutil, requests, python-slugify, six, tqdm, certifi, urllib3
# Required-by:

I thought the api token was not made correctly, so I made them all expire and made a new token again, but it did not work.

I appreciate if anyone help me out.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:14
  • Comments:29

github_iconTop GitHub Comments

25reactions
Chizuchizucommented, Nov 27, 2020

I ran into the same problem, but after creating a new Kaggle Token, the problem was fixed!

10reactions
AlinaWithAFacecommented, Jul 10, 2020

I’ve also run into this issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

API 401 - Unauthorized error | Data Science and ... - Kaggle
I installed the API via pip and then tried to run "kaggle competitions list", then I received "401 - Unauthorized" error, JSON file...
Read more >
How to download data set into Colab? Stuck with a problem, it ...
kaggle datasets download -d clorichel/boat-types-recognition -p ./data But I am unable to download it into colab, I am getting error, "401 - ...
Read more >
How to download datasets from Kaggle to Google Colab
Log in to your Kaggle account, click on your profile, go to your account, scroll to the API section and click Expire API...
Read more >
Solved: Acquired token gives 401 Unauthorized when trying
Acquired token gives 401 Unauthorized when trying to create DataSet ... string resourceUri = "https://analysis.windows.net/powerbi/api"; string authorityUri ...
Read more >
Kaggle API issue - Part 1 (2020) - fast.ai Course Forums
The error you get it is just kaggle authorization error. Make sure you have your kaggle.json in ~/.kaggle (the error you show now...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found