Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot use 'kaggle.competitions' in Kaggle kernel

Tags:

python

kaggle

I am trying to use a Python module in the remote Kaggle kernel, but when I run, from kaggle.competitions import nflrush, this error appears:

Could not find kaggle.json. Make sure it's located in /root/.kaggle. Or use the environment method.
  • I am using Kaggle Notebooks.
  • The Nlf Rush was a competition in kaggle that ended 2 months ago
  • os.getcwd(), gives me: '/kaggle/working'
  • os.listdir(), gives me: ['.ipynb_checkpoints', '__notebook_source__.ipynb']

But I don't know how to add the credentials kaggle.json in the Kaggle remote kernel. Or is it because the competition is over?

like image 292
René Tarot Avatar asked Mar 10 '26 11:03

René Tarot


2 Answers

The Ones managing the competition made an R Version of the module. The problem with Python still persists. Here is the link for the R version: https://www.kaggle.com/wcukierski/official-r-starter-notebook-nfl-big-data-bowl

like image 155
René Tarot Avatar answered Mar 13 '26 00:03

René Tarot


I believe it is because your notebook is not attached to the dataset.

See this forum post for details on how to do so: https://www.kaggle.com/c/nfl-big-data-bowl-2020/discussion/113684.

the easiest is to create it from within the competition: click the "Notebooks" tab on any page in the competition — or just go here: https://www.kaggle.com/c/nfl-big-data-bowl-2020/notebooks — and click on "New Notebook" then the notebook should be set up properly.

like image 35
jorijnsmit Avatar answered Mar 13 '26 01:03

jorijnsmit



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!