{
  "id": 572338,
  "title": "Kaggle API Dataset Upload Fails with ApiStartBlobUploadRequest.__init__() got an unexpected keyword argument 'type'",
  "url": "/competitions/byu-locating-bacterial-flagellar-motors-2025/discussion/572338",
  "author_name": "",
  "post_date": "2025-04-09T02:28:21.985768200Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hi, I'm trying to upload multiple datasets to Kaggle using the official Kaggle API, and I'm running into a persistent issue.</p>\n<p>I initially decided to upload my preprocessed 3D image dataset to Kaggle for further work in the notebook environment, particularly to take advantage of the GPU, as the preprocessing on my local CPU was causing significant bottlenecks. The rationale behind this decision was simple: redoing the preprocessing on Kaggle seemed far more efficient compared to waiting for the process to finish on my local machine.</p>\n<p>I'm splitting a large dataset (over 140GB) into 33 parts, each under 20GB, and attempting to upload them as separate datasets using kaggle datasets create. The files are .npz format and are accompanied by a valid dataset-metadata.json.</p>\n<p>While the upload appears to complete for some files (showing Upload successful), the overall command still fails with:</p>\n<p>Error while trying to load upload info: ApiStartBlobUploadRequest.<strong>init</strong>() got an unexpected keyword argument 'type'<br>\n400 Client Error: Bad Request for url: <a href=\"https://www.kaggle.com/api/v1/blobs/upload\" target=\"_blank\">https://www.kaggle.com/api/v1/blobs/upload</a></p>\n<p>I’ve already tried:</p>\n<p>Updating Kaggle API to latest from GitHub</p>\n<p>Removing .type assignment in the source code (as the error suggests it's not accepted)</p>\n<p>Verifying metadata and API token</p>\n<p>Uploading via CLI in both zipped and unzipped (--dir-mode=tar) mode</p>\n<p>Checking that .npz files are valid and not corrupted</p>\n<p>Confirming the folder isn’t empty</p>\n<p>Trying different Python environments (base + virtualenv)</p>\n<p>Even with these steps, uploads frequently fail, and no dataset appears on my Kaggle profile. Oddly, some files do show as uploaded individually, but the dataset itself isn't finalized or listed.</p>\n<p>Is there a bug in the current API release, or is there an undocumented constraint or workaround?</p>\n<p>Any guidance would be greatly appreciated. This has been driving me insane.</p>\n<p>Thanks.</p>",
  "messages": [
    {
      "id": "3174352",
      "postDate": "04/09/2025 02:28:21",
      "content": "<p>Hi, I'm trying to upload multiple datasets to Kaggle using the official Kaggle API, and I'm running into a persistent issue.</p>\n<p>I initially decided to upload my preprocessed 3D image dataset to Kaggle for further work in the notebook environment, particularly to take advantage of the GPU, as the preprocessing on my local CPU was causing significant bottlenecks. The rationale behind this decision was simple: redoing the preprocessing on Kaggle seemed far more efficient compared to waiting for the process to finish on my local machine.</p>\n<p>I'm splitting a large dataset (over 140GB) into 33 parts, each under 20GB, and attempting to upload them as separate datasets using kaggle datasets create. The files are .npz format and are accompanied by a valid dataset-metadata.json.</p>\n<p>While the upload appears to complete for some files (showing Upload successful), the overall command still fails with:</p>\n<p>Error while trying to load upload info: ApiStartBlobUploadRequest.<strong>init</strong>() got an unexpected keyword argument 'type'<br>\n400 Client Error: Bad Request for url: <a href=\"https://www.kaggle.com/api/v1/blobs/upload\" target=\"_blank\">https://www.kaggle.com/api/v1/blobs/upload</a></p>\n<p>I’ve already tried:</p>\n<p>Updating Kaggle API to latest from GitHub</p>\n<p>Removing .type assignment in the source code (as the error suggests it's not accepted)</p>\n<p>Verifying metadata and API token</p>\n<p>Uploading via CLI in both zipped and unzipped (--dir-mode=tar) mode</p>\n<p>Checking that .npz files are valid and not corrupted</p>\n<p>Confirming the folder isn’t empty</p>\n<p>Trying different Python environments (base + virtualenv)</p>\n<p>Even with these steps, uploads frequently fail, and no dataset appears on my Kaggle profile. Oddly, some files do show as uploaded individually, but the dataset itself isn't finalized or listed.</p>\n<p>Is there a bug in the current API release, or is there an undocumented constraint or workaround?</p>\n<p>Any guidance would be greatly appreciated. This has been driving me insane.</p>\n<p>Thanks.</p>",
      "rawMarkdown": "Hi, I'm trying to upload multiple datasets to Kaggle using the official Kaggle API, and I'm running into a persistent issue.\n\nI initially decided to upload my preprocessed 3D image dataset to Kaggle for further work in the notebook environment, particularly to take advantage of the GPU, as the preprocessing on my local CPU was causing significant bottlenecks. The rationale behind this decision was simple: redoing the preprocessing on Kaggle seemed far more efficient compared to waiting for the process to finish on my local machine.\n\nI'm splitting a large dataset (over 140GB) into 33 parts, each under 20GB, and attempting to upload them as separate datasets using kaggle datasets create. The files are .npz format and are accompanied by a valid dataset-metadata.json.\n\nWhile the upload appears to complete for some files (showing Upload successful), the overall command still fails with:\n\n\nError while trying to load upload info: ApiStartBlobUploadRequest.__init__() got an unexpected keyword argument 'type'\n400 Client Error: Bad Request for url: https://www.kaggle.com/api/v1/blobs/upload\n\nI’ve already tried:\n\nUpdating Kaggle API to latest from GitHub\n\nRemoving .type assignment in the source code (as the error suggests it's not accepted)\n\nVerifying metadata and API token\n\nUploading via CLI in both zipped and unzipped (--dir-mode=tar) mode\n\nChecking that .npz files are valid and not corrupted\n\nConfirming the folder isn’t empty\n\nTrying different Python environments (base + virtualenv)\n\nEven with these steps, uploads frequently fail, and no dataset appears on my Kaggle profile. Oddly, some files do show as uploaded individually, but the dataset itself isn't finalized or listed.\n\nIs there a bug in the current API release, or is there an undocumented constraint or workaround?\n\nAny guidance would be greatly appreciated. This has been driving me insane.\n\nThanks.",
      "votes": null
    },
    {
      "id": "3174470",
      "postDate": "04/09/2025 06:29:08",
      "content": "<p>Hello, can you share a way to reproduce the issue?</p>",
      "rawMarkdown": "Hello, can you share a way to reproduce the issue?",
      "votes": null
    },
    {
      "id": "3185889",
      "postDate": "04/24/2025 01:31:07",
      "content": "<p>I'm so sorry, I checked it late.<br>\nI have uploaded one by one on the web now.<br>\nIf I were to summarize it roughly, I'd make a json, and through kaggle cli<br>\n(ex, kaggle datasets create -p \"D:/BYU Project/preprocessed_parts\")<br>\nFailed to attempt to upload.<br>\nOnce again, I apologize.</p>",
      "rawMarkdown": "I'm so sorry, I checked it late.\nI have uploaded one by one on the web now.\nIf I were to summarize it roughly, I'd make a json, and through kaggle cli\n(ex, kaggle datasets create -p \"D:/BYU Project/preprocessed_parts\")\nFailed to attempt to upload.\nOnce again, I apologize.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3174470,
      "author_name": "mathieuduverne",
      "author_url": "",
      "post_date": "04/09/2025 06:29:08",
      "content": "<p>Hello, can you share a way to reproduce the issue?</p>",
      "votes": null,
      "replies": [
        {
          "id": 3185889,
          "author_name": "hwangsungi",
          "author_url": "",
          "post_date": "04/24/2025 01:31:07",
          "content": "<p>I'm so sorry, I checked it late.<br>\nI have uploaded one by one on the web now.<br>\nIf I were to summarize it roughly, I'd make a json, and through kaggle cli<br>\n(ex, kaggle datasets create -p \"D:/BYU Project/preprocessed_parts\")<br>\nFailed to attempt to upload.<br>\nOnce again, I apologize.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3174352": "Hi, I'm trying to upload multiple datasets to Kaggle using the official Kaggle API, and I'm running into a persistent issue.\n\nI initially decided to upload my preprocessed 3D image dataset to Kaggle for further work in the notebook environment, particularly to take advantage of the GPU, as the preprocessing on my local CPU was causing significant bottlenecks. The rationale behind this decision was simple: redoing the preprocessing on Kaggle seemed far more efficient compared to waiting for the process to finish on my local machine.\n\nI'm splitting a large dataset (over 140GB) into 33 parts, each under 20GB, and attempting to upload them as separate datasets using kaggle datasets create. The files are .npz format and are accompanied by a valid dataset-metadata.json.\n\nWhile the upload appears to complete for some files (showing Upload successful), the overall command still fails with:\n\n\nError while trying to load upload info: ApiStartBlobUploadRequest.__init__() got an unexpected keyword argument 'type'\n400 Client Error: Bad Request for url: https://www.kaggle.com/api/v1/blobs/upload\n\nI’ve already tried:\n\nUpdating Kaggle API to latest from GitHub\n\nRemoving .type assignment in the source code (as the error suggests it's not accepted)\n\nVerifying metadata and API token\n\nUploading via CLI in both zipped and unzipped (--dir-mode=tar) mode\n\nChecking that .npz files are valid and not corrupted\n\nConfirming the folder isn’t empty\n\nTrying different Python environments (base + virtualenv)\n\nEven with these steps, uploads frequently fail, and no dataset appears on my Kaggle profile. Oddly, some files do show as uploaded individually, but the dataset itself isn't finalized or listed.\n\nIs there a bug in the current API release, or is there an undocumented constraint or workaround?\n\nAny guidance would be greatly appreciated. This has been driving me insane.\n\nThanks.",
    "3174470": "Hello, can you share a way to reproduce the issue?",
    "3185889": "I'm so sorry, I checked it late.\nI have uploaded one by one on the web now.\nIf I were to summarize it roughly, I'd make a json, and through kaggle cli\n(ex, kaggle datasets create -p \"D:/BYU Project/preprocessed_parts\")\nFailed to attempt to upload.\nOnce again, I apologize."
  },
  "source": "meta"
}