{
  "id": 426846,
  "title": "Why is that kernel is running forever when I run the first default cell?",
  "url": "/competitions/bengaliai-speech/discussion/426846",
  "author_name": "",
  "post_date": "2023-07-25T10:28:07.086452300Z",
  "votes": null,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I opened a new notebook under this competition and when I run the first default created cell, it is running forever. This is very annoying as I am unable to run other cells or run the entire notebook at once. Because of this cell, other cells too run forever. Any suggestions?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3761209%2F39616e8d344cff4ed506acefa3367c04%2Fk.jpg?generation=1690280857025069&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "2358154",
      "postDate": "07/25/2023 10:28:07",
      "content": "<p>I opened a new notebook under this competition and when I run the first default created cell, it is running forever. This is very annoying as I am unable to run other cells or run the entire notebook at once. Because of this cell, other cells too run forever. Any suggestions?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3761209%2F39616e8d344cff4ed506acefa3367c04%2Fk.jpg?generation=1690280857025069&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I opened a new notebook under this competition and when I run the first default created cell, it is running forever. This is very annoying as I am unable to run other cells or run the entire notebook at once. Because of this cell, other cells too run forever. Any suggestions?\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3761209%2F39616e8d344cff4ed506acefa3367c04%2Fk.jpg?generation=1690280857025069&alt=media)",
      "votes": null
    },
    {
      "id": "2358280",
      "postDate": "07/25/2023 12:19:52",
      "content": "<p>restart the runtime it might work</p>",
      "rawMarkdown": "restart the runtime it might work",
      "votes": null
    },
    {
      "id": "2358941",
      "postDate": "07/25/2023 20:59:24",
      "content": "<p>This is because when you run it, it walks through all the files that are present in the input and prints them. In this case, the input has around 1M files and when you try to go through all these files and print these many lines in your Kaggle NB, the browser hangs! </p>",
      "rawMarkdown": "This is because when you run it, it walks through all the files that are present in the input and prints them. In this case, the input has around 1M files and when you try to go through all these files and print these many lines in your Kaggle NB, the browser hangs!",
      "votes": null
    },
    {
      "id": "2359596",
      "postDate": "07/26/2023 09:01:24",
      "content": "<p>Correct. Is there a way I stop it after it displays just the files and folders in the MAIN FOLDER only? I tried using 'break' statement and 'counter in the for loop' etc., but it does not work. The only way it is working is to comment out those 'for loops'.</p>",
      "rawMarkdown": "Correct. Is there a way I stop it after it displays just the files and folders in the MAIN FOLDER only? I tried using 'break' statement and 'counter in the for loop' etc., but it does not work. The only way it is working is to comment out those 'for loops'.",
      "votes": null
    },
    {
      "id": "2392697",
      "postDate": "08/15/2023 20:04:15",
      "content": "<p>The fix for this open your kaggle space with input and output on left side then use the path from there by copying rather than letting it load.<br>\nIt happens because that code basically runs through all files and prints them and since data is so big you may wanna skip that</p>",
      "rawMarkdown": "The fix for this open your kaggle space with input and output on left side then use the path from there by copying rather than letting it load.\nIt happens because that code basically runs through all files and prints them and since data is so big you may wanna skip that",
      "votes": null
    },
    {
      "id": "2392718",
      "postDate": "08/15/2023 20:34:52",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/Srinivas\" target=\"_blank\">@Srinivas</a><br>\nJust remove the first cell and write your code in a new empty cell.<br>\nif you need names of folders in the main folder, use this line of code:<br>\nfolders = glob('/kaggle/input/*')</p>",
      "rawMarkdown": "Hello @Srinivas\nJust remove the first cell and write your code in a new empty cell.\nif you need names of folders in the main folder, use this line of code:\nfolders = glob('/kaggle/input/*')",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2358280,
      "author_name": "vinayak121",
      "author_url": "",
      "post_date": "07/25/2023 12:19:52",
      "content": "<p>restart the runtime it might work</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2358941,
      "author_name": "mbmmurad",
      "author_url": "",
      "post_date": "07/25/2023 20:59:24",
      "content": "<p>This is because when you run it, it walks through all the files that are present in the input and prints them. In this case, the input has around 1M files and when you try to go through all these files and print these many lines in your Kaggle NB, the browser hangs! </p>",
      "votes": null,
      "replies": [
        {
          "id": 2359596,
          "author_name": "valmetisrinivas",
          "author_url": "",
          "post_date": "07/26/2023 09:01:24",
          "content": "<p>Correct. Is there a way I stop it after it displays just the files and folders in the MAIN FOLDER only? I tried using 'break' statement and 'counter in the for loop' etc., but it does not work. The only way it is working is to comment out those 'for loops'.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2392718,
              "author_name": "newtoaii",
              "author_url": "",
              "post_date": "08/15/2023 20:34:52",
              "content": "<p>Hello <a href=\"https://www.kaggle.com/Srinivas\" target=\"_blank\">@Srinivas</a><br>\nJust remove the first cell and write your code in a new empty cell.<br>\nif you need names of folders in the main folder, use this line of code:<br>\nfolders = glob('/kaggle/input/*')</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2392697,
      "author_name": "shivamsingh17072001",
      "author_url": "",
      "post_date": "08/15/2023 20:04:15",
      "content": "<p>The fix for this open your kaggle space with input and output on left side then use the path from there by copying rather than letting it load.<br>\nIt happens because that code basically runs through all files and prints them and since data is so big you may wanna skip that</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2358154": "I opened a new notebook under this competition and when I run the first default created cell, it is running forever. This is very annoying as I am unable to run other cells or run the entire notebook at once. Because of this cell, other cells too run forever. Any suggestions?\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3761209%2F39616e8d344cff4ed506acefa3367c04%2Fk.jpg?generation=1690280857025069&alt=media)",
    "2358280": "restart the runtime it might work",
    "2358941": "This is because when you run it, it walks through all the files that are present in the input and prints them. In this case, the input has around 1M files and when you try to go through all these files and print these many lines in your Kaggle NB, the browser hangs!",
    "2359596": "Correct. Is there a way I stop it after it displays just the files and folders in the MAIN FOLDER only? I tried using 'break' statement and 'counter in the for loop' etc., but it does not work. The only way it is working is to comment out those 'for loops'.",
    "2392697": "The fix for this open your kaggle space with input and output on left side then use the path from there by copying rather than letting it load.\nIt happens because that code basically runs through all files and prints them and since data is so big you may wanna skip that",
    "2392718": "Hello @Srinivas\nJust remove the first cell and write your code in a new empty cell.\nif you need names of folders in the main folder, use this line of code:\nfolders = glob('/kaggle/input/*')"
  },
  "source": "meta"
}