{
  "id": 98768,
  "title": "Not able to add utility scripts",
  "url": "/competitions/aptos2019-blindness-detection/discussion/98768",
  "author_name": "Rishabh Agrahari",
  "post_date": "2019-07-06T07:01:22.034000",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hey guys,\nI've created a utility script, but I'm not able to add it to my kernel notebook. It is my first kernel-only competition. Can anyone help me out? I've attached the relevant screenshots.\n.\n.\nMy utility script:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2Fb12881e0afc922ef510a76c780f5498b%2Fpic-selected-190706-1224-00.png?generation=1562396385420700&amp;alt=media\" alt=\"\">\n.\n.\n.\nThis is what I get when I try to add the utility script to my notebook:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2F4a15b35aeea301a53374cbb6e4108445%2Fpic-selected-190706-1224-21.png?generation=1562396402521657&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 569485,
      "postDate": "2019-07-06T18:45:06.450Z",
      "content": "<p>You have to store your utility scipts (<code>myscipt1.py</code> , <code>myscipt2.py</code>, <code>myscipt3.py</code> etc. ) in a created dataset. (for instance you can create <code>APTOSUtils</code> data and add there your scripts  ) </p>\n\n<p>Then you can import them on kernel like this :</p>\n\n<p>```\nimport sys\nsys.path.append(\"../input/aptosutils/\")\nimport myscipt1\nfrom myscript2 import *\nfrom myscript3 import myclass1, myfunction1, myfunction2</p>\n\n<p>```</p>",
      "rawMarkdown": "You have to store your utility scipts (`myscipt1.py` , `myscipt2.py`, `myscipt3.py` etc. ) in a created dataset. (for instance you can create `APTOSUtils` data and add there your scripts  ) \n\nThen you can import them on kernel like this :\n\n```\nimport sys\nsys.path.append(\"../input/aptosutils/\")\nimport myscipt1\nfrom myscript2 import *\nfrom myscript3 import myclass1, myfunction1, myfunction2\n\n```",
      "votes": 4,
      "replies": [
        {
          "id": 569519,
          "postDate": "2019-07-06T19:43:52.360Z",
          "content": "<p>Thanks for the workaround. But any ideas why the regular/official method is not working? It is because of some limitation in this competition?</p>",
          "rawMarkdown": "Thanks for the workaround. But any ideas why the regular/official method is not working? It is because of some limitation in this competition?",
          "votes": 1
        }
      ]
    },
    {
      "id": 722183,
      "postDate": "2020-01-18T08:24:43.810Z",
      "content": "<p>I don't know if it is still relevant but I stumbled this issue recently. After adding your script file into kaggle, you need to click File and set it as a utility script. Then commit one more time and hopefully, it will show it on the list next time.</p>",
      "rawMarkdown": "I don't know if it is still relevant but I stumbled this issue recently. After adding your script file into kaggle, you need to click File and set it as a utility script. Then commit one more time and hopefully, it will show it on the list next time.",
      "votes": 2,
      "replies": [
        {
          "id": 815925,
          "postDate": "2020-04-22T00:20:12.113Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 569157,
      "postDate": "2019-07-06T07:01:22.033Z",
      "content": "<p>Hey guys,\nI've created a utility script, but I'm not able to add it to my kernel notebook. It is my first kernel-only competition. Can anyone help me out? I've attached the relevant screenshots.\n.\n.\nMy utility script:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2Fb12881e0afc922ef510a76c780f5498b%2Fpic-selected-190706-1224-00.png?generation=1562396385420700&amp;alt=media\" alt=\"\">\n.\n.\n.\nThis is what I get when I try to add the utility script to my notebook:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2F4a15b35aeea301a53374cbb6e4108445%2Fpic-selected-190706-1224-21.png?generation=1562396402521657&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Hey guys,\nI've created a utility script, but I'm not able to add it to my kernel notebook. It is my first kernel-only competition. Can anyone help me out? I've attached the relevant screenshots.\n.\n.\nMy utility script:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2Fb12881e0afc922ef510a76c780f5498b%2Fpic-selected-190706-1224-00.png?generation=1562396385420700&amp;alt=media)\n.\n.\n.\nThis is what I get when I try to add the utility script to my notebook:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2F4a15b35aeea301a53374cbb6e4108445%2Fpic-selected-190706-1224-21.png?generation=1562396402521657&amp;alt=media)\n"
    }
  ],
  "comments": [
    {
      "id": 569485,
      "author_name": "Serigne ",
      "author_url": "",
      "post_date": "2019-07-06T18:45:06.450000",
      "content": "<p>You have to store your utility scipts (<code>myscipt1.py</code> , <code>myscipt2.py</code>, <code>myscipt3.py</code> etc. ) in a created dataset. (for instance you can create <code>APTOSUtils</code> data and add there your scripts  ) </p>\n\n<p>Then you can import them on kernel like this :</p>\n\n<p>```\nimport sys\nsys.path.append(\"../input/aptosutils/\")\nimport myscipt1\nfrom myscript2 import *\nfrom myscript3 import myclass1, myfunction1, myfunction2</p>\n\n<p>```</p>",
      "votes": 4,
      "replies": [
        {
          "id": 569519,
          "author_name": "Rishabh Agrahari",
          "author_url": "",
          "post_date": "2019-07-06T19:43:52.360000",
          "content": "<p>Thanks for the workaround. But any ideas why the regular/official method is not working? It is because of some limitation in this competition?</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 722183,
      "author_name": "Ubeydullah ŞARK",
      "author_url": "",
      "post_date": "2020-01-18T08:24:43.810000",
      "content": "<p>I don't know if it is still relevant but I stumbled this issue recently. After adding your script file into kaggle, you need to click File and set it as a utility script. Then commit one more time and hopefully, it will show it on the list next time.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 815925,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-04-22T00:20:12.113000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "569485": "You have to store your utility scipts (`myscipt1.py` , `myscipt2.py`, `myscipt3.py` etc. ) in a created dataset. (for instance you can create `APTOSUtils` data and add there your scripts  ) \n\nThen you can import them on kernel like this :\n\n```\nimport sys\nsys.path.append(\"../input/aptosutils/\")\nimport myscipt1\nfrom myscript2 import *\nfrom myscript3 import myclass1, myfunction1, myfunction2\n\n```",
    "722183": "I don't know if it is still relevant but I stumbled this issue recently. After adding your script file into kaggle, you need to click File and set it as a utility script. Then commit one more time and hopefully, it will show it on the list next time.",
    "569157": "Hey guys,\nI've created a utility script, but I'm not able to add it to my kernel notebook. It is my first kernel-only competition. Can anyone help me out? I've attached the relevant screenshots.\n.\n.\nMy utility script:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2Fb12881e0afc922ef510a76c780f5498b%2Fpic-selected-190706-1224-00.png?generation=1562396385420700&amp;alt=media)\n.\n.\n.\nThis is what I get when I try to add the utility script to my notebook:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F761152%2F4a15b35aeea301a53374cbb6e4108445%2Fpic-selected-190706-1224-21.png?generation=1562396402521657&amp;alt=media)\n"
  }
}