{
  "id": 287139,
  "title": "Getting NoneTypeError with enumerate(iter_test) in loop ",
  "url": "/competitions/g-research-crypto-forecasting/discussion/287139",
  "author_name": "",
  "post_date": "2021-11-12T11:33:26.374884500Z",
  "votes": 3,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I am getting TypeError with iteration functionality in G-Research crypto environment. Getting this error in line from code having loop.</p>\n<pre><code>env = gresearch_crypto.make_env()\niter_test = env.iter_test()\n\nfor i, (df_test, df_pred_lgb) in enumerate(iter_test):\n</code></pre>\n<p>TypeError: cannot unpack non-iterable NoneType object.</p>",
  "messages": [
    {
      "id": "1579974",
      "postDate": "11/12/2021 11:33:26",
      "content": "<p>I am getting TypeError with iteration functionality in G-Research crypto environment. Getting this error in line from code having loop.</p>\n<pre><code>env = gresearch_crypto.make_env()\niter_test = env.iter_test()\n\nfor i, (df_test, df_pred_lgb) in enumerate(iter_test):\n</code></pre>\n<p>TypeError: cannot unpack non-iterable NoneType object.</p>",
      "rawMarkdown": "I am getting TypeError with iteration functionality in G-Research crypto environment. Getting this error in line from code having loop.\n\n```\nenv = gresearch_crypto.make_env()\niter_test = env.iter_test()\n\nfor i, (df_test, df_pred_lgb) in enumerate(iter_test):\n\n```\nTypeError: cannot unpack non-iterable NoneType object.",
      "votes": null
    },
    {
      "id": "1580172",
      "postDate": "11/12/2021 14:44:30",
      "content": "<p>I got the same error. The thing is you can call this loop just once. When I resetted the kernel and run all cells, it worked. In addition, in my code, first two lines is in a different cell than loop.</p>",
      "rawMarkdown": "I got the same error. The thing is you can call this loop just once. When I resetted the kernel and run all cells, it worked. In addition, in my code, first two lines is in a different cell than loop.",
      "votes": null
    },
    {
      "id": "1641789",
      "postDate": "01/07/2022 17:57:55",
      "content": "<p>Is there a more efficient way to re-run the loop rather than restarting the kernel?</p>",
      "rawMarkdown": "Is there a more efficient way to re-run the loop rather than restarting the kernel?",
      "votes": null
    },
    {
      "id": "1642149",
      "postDate": "01/08/2022 05:23:34",
      "content": "<p>Check this API out written by <a href=\"https://www.kaggle.com/jagofc\" target=\"_blank\">@jagofc</a></p>\n<p><a href=\"https://www.kaggle.com/jagofc/local-api-emulator\" target=\"_blank\">https://www.kaggle.com/jagofc/local-api-emulator</a> </p>",
      "rawMarkdown": "Check this API out written by @jagofc\n\nhttps://www.kaggle.com/jagofc/local-api-emulator",
      "votes": null
    },
    {
      "id": "1642558",
      "postDate": "01/08/2022 13:54:06",
      "content": "<p>There's a new update to the API <a href=\"https://www.kaggle.com/jagofc/local-api-emulator-is-now-a-module\" target=\"_blank\">here</a>.</p>",
      "rawMarkdown": "There's a new update to the API [here](https://www.kaggle.com/jagofc/local-api-emulator-is-now-a-module).",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1580172,
      "author_name": "fatihaslan",
      "author_url": "",
      "post_date": "11/12/2021 14:44:30",
      "content": "<p>I got the same error. The thing is you can call this loop just once. When I resetted the kernel and run all cells, it worked. In addition, in my code, first two lines is in a different cell than loop.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1641789,
      "author_name": "shashank069",
      "author_url": "",
      "post_date": "01/07/2022 17:57:55",
      "content": "<p>Is there a more efficient way to re-run the loop rather than restarting the kernel?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1642149,
          "author_name": "jonnydossantos",
          "author_url": "",
          "post_date": "01/08/2022 05:23:34",
          "content": "<p>Check this API out written by <a href=\"https://www.kaggle.com/jagofc\" target=\"_blank\">@jagofc</a></p>\n<p><a href=\"https://www.kaggle.com/jagofc/local-api-emulator\" target=\"_blank\">https://www.kaggle.com/jagofc/local-api-emulator</a> </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1642558,
          "author_name": "jagofc",
          "author_url": "",
          "post_date": "01/08/2022 13:54:06",
          "content": "<p>There's a new update to the API <a href=\"https://www.kaggle.com/jagofc/local-api-emulator-is-now-a-module\" target=\"_blank\">here</a>.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1579974": "I am getting TypeError with iteration functionality in G-Research crypto environment. Getting this error in line from code having loop.\n\n```\nenv = gresearch_crypto.make_env()\niter_test = env.iter_test()\n\nfor i, (df_test, df_pred_lgb) in enumerate(iter_test):\n\n```\nTypeError: cannot unpack non-iterable NoneType object.",
    "1580172": "I got the same error. The thing is you can call this loop just once. When I resetted the kernel and run all cells, it worked. In addition, in my code, first two lines is in a different cell than loop.",
    "1641789": "Is there a more efficient way to re-run the loop rather than restarting the kernel?",
    "1642149": "Check this API out written by @jagofc\n\nhttps://www.kaggle.com/jagofc/local-api-emulator",
    "1642558": "There's a new update to the API [here](https://www.kaggle.com/jagofc/local-api-emulator-is-now-a-module)."
  },
  "source": "meta"
}