Closed mhiro216 closed 3 years ago
I've also run into this issue!
I ran into the same problem, but after creating a new Kaggle Token, the problem was fixed!
I ran into the same problem, but after creating a new Kaggle Token, the problem was fixed!
Ran into this problem as well, even when creating a new Kaggle Token and/or expiring all tokens before I'm still getting 401 Unauthorized.
I overcame this issue by deleteing the kagge.json file and replacing it with a new one downloaded from kaggle. Its the file that goes exacty at root/.kaggle/kaggle.json
Thank you all. I resolved this issue with you all's process.
I overcome this problem by creating a new API token and then replaced that with the older one.
issue resolved for me when i took new api token and expired all previous ones and downloaded json file again from kaggle by deleting old json file. It works
I had uploaded the JSON file into colab already while working, so even after creating a new token since I forgot to clear all the outputs from the kernel it was still showing an error. If anyone's working in google colab they should do a factory reset before uploading a new JSON file.
Issue for me was that I set the kaggle API key using parenthesis ("). Should (obivously) be without it...
%env KAGGLE_KEY="1234...567890"
Hi. I ran into the same issue while following this guideline in google colab: https://www.kaggle.com/general/74235
I tried @Chizuchizu's tip, and it worked.
1) Factory reset runtime 2) Expire and redownload a new API.
Thanks everyone!
You can check if the following in ~ / .bashrc are the same as kaggle.json
export KAGGLE_USERNAME=datadinosaur
export KAGGLE_KEY=xxxxxxxxxxxxxx
I still have this problem , please help me
If your are on a jupyter instance: For me it helped to restart the kernel after updating the API Key. That's what "Factory reset runtime" was for @deep-woods.
So why is this closed? The code is definitely broken. If Kaggle cannot generate tokens, or have problems with their request validation or whatever else the problem is, they need to know about it / fix it.
Why close this issue if nothing was fixed?
Facing this issue here as well.
Tried to expire the tokens and run it (saved the json in ~/.kaggle/kaggle.json & also tried to do in bashrc with the export command + source command)
Still no luck. Suprising.
Is there any command, by which kaggle user json config can be re-initialized ?
What worked for me was creating a token without expiring the old one(s). Based on the toast notifications in the Kaggle web app, it looked like clicking "Expire API Token" followed by "Create New API Token" actually resulted in the new token getting created and then immediately being expired. When I clicked "Create" without first "Expire", the newly generated token worked as expected.
I ran into the same problem today.@bi1yeu tip worked for me.Thank you.
issue resolved for me when i took new api token and expired all previous ones and downloaded json file again from kaggle by deleting old json file. It works
Thanks a lot man, it worked!!
I am facing this issue on my my system. Have done the following
Okay, strangely enough, it started to work, my bad.
FYI, try the EXPORT Command, it will precendence over the kaggle.json file. This was how it started to work in mine. Thanks
how did u apply EXPORT, can you write th code for me
Same problem here. I repeat expire all token and then create new token but always 401 unauthorized...
So, do check your file manually as well. Which is placed at ~/kaggle/kaggle.json. Quite often the export commands don't update it.
how did u apply EXPORT, can you write th code for me
It's a Linux command to create a variable and assign it a value
After renewing your API if you still have issue, make sure your json file name is kaggle.json and your code is the same as below.
! mkdir ~/.kaggle
! cp kaggle.json ~/.kaggle/kaggle.json
! chmod 600 ~/.kaggle/kaggle.json
! kaggle datasets list
I am facing the same issue (ApiException: (401)) while downloading the dataset from Kaggle I gave the right credentials but still it is showing the same issue
Ich habe das gleiche Problem (ApiException: (401)) beim Herunterladen des Datensatzes von Kaggle . Ich habe die richtigen Anmeldeinformationen angegeben, aber es zeigt immer noch das gleiche Problem
Vorher war alles in Ordnung. Nur seit heute habe ich das gleiche Problem wie du.
All solutions described above don't work. The only solution is to manually download. Not sure why kaggle can't fix this issue: 401 - Unauthorized
I finally resolved this problem by running sudo kaggle ...
(after KAGGLE_USERNAME is set). I think it is because I am not using the admin account and chmod 600
only gives permission to the admin.
I overcame this issue by deleteing the kagge.json file and replacing it with a new one downloaded from kaggle. Its the file that goes exacty at root/.kaggle/kaggle.json
yes it worked!
In my case the issue was how kaggle cli was installed.
Saw this error after running:
pip install kaggle
but fixed after running:
pip uninstall kaggle pip install --user kaggle (restart shell)
So the issue was actually which user/where the home directory and path to ~/.kaggle/kaggle.json was.
I overcame this issue by deleteing the kagge.json file and replacing it with a new one downloaded from kaggle. Its the file that goes exacty at root/.kaggle/kaggle.json
I fixed my error with your suggestion thank you for helping the community
I fix by reopen the terminal
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.
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.