{
  "id": 53194,
  "title": "Submission Error, submitted csv has rows with odd number of values",
  "url": "/competitions/data-science-bowl-2018/discussion/53194",
  "author_name": "",
  "post_date": "2018-03-28T05:41:16.105627100Z",
  "votes": null,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I was submitting and there is an error saying the submission has rows with odd number of values. I checked the csv, but all rows are with size 2.</p>\n\n<p>This is how I write the csv. dict_pred_nuclei is a dictionary, where \"key\" is the folder/image name, value is the encoded values.</p>\n\n<pre><code>with open('submission.csv', 'wb') as csvfile:\n        writer = csv.writer(csvfile)\n        writer.writerow([\"ImageId\",\"EncodedPixels\"])\n        for key, value in dict_pred_nuclei.items():\n            for pred_enc_xy in value:\n                str_enc_xy = \" \".join(str(x) for x in pred_enc_xy)\n                writer.writerow([key, str_enc_xy])\n</code></pre>",
  "messages": [
    {
      "id": "304851",
      "postDate": "03/28/2018 05:41:16",
      "content": "<p>I was submitting and there is an error saying the submission has rows with odd number of values. I checked the csv, but all rows are with size 2.</p>\n\n<p>This is how I write the csv. dict_pred_nuclei is a dictionary, where \"key\" is the folder/image name, value is the encoded values.</p>\n\n<pre><code>with open('submission.csv', 'wb') as csvfile:\n        writer = csv.writer(csvfile)\n        writer.writerow([\"ImageId\",\"EncodedPixels\"])\n        for key, value in dict_pred_nuclei.items():\n            for pred_enc_xy in value:\n                str_enc_xy = \" \".join(str(x) for x in pred_enc_xy)\n                writer.writerow([key, str_enc_xy])\n</code></pre>",
      "rawMarkdown": "I was submitting and there is an error saying the submission has rows with odd number of values. I checked the csv, but all rows are with size 2.\n\nThis is how I write the csv. dict_pred_nuclei is a dictionary, where \"key\" is the folder/image name, value is the encoded values.\n\n    with open('submission.csv', 'wb') as csvfile:\n            writer = csv.writer(csvfile)\n            writer.writerow([\"ImageId\",\"EncodedPixels\"])\n            for key, value in dict_pred_nuclei.items():\n                for pred_enc_xy in value:\n                    str_enc_xy = \" \".join(str(x) for x in pred_enc_xy)\n                    writer.writerow([key, str_enc_xy])",
      "votes": null
    },
    {
      "id": "1996954",
      "postDate": "10/20/2022 14:21:37",
      "content": "<p>Hello, have you found the error?</p>",
      "rawMarkdown": "Hello, have you found the error?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1996954,
      "author_name": "maxencewynen",
      "author_url": "",
      "post_date": "10/20/2022 14:21:37",
      "content": "<p>Hello, have you found the error?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "304851": "I was submitting and there is an error saying the submission has rows with odd number of values. I checked the csv, but all rows are with size 2.\n\nThis is how I write the csv. dict_pred_nuclei is a dictionary, where \"key\" is the folder/image name, value is the encoded values.\n\n    with open('submission.csv', 'wb') as csvfile:\n            writer = csv.writer(csvfile)\n            writer.writerow([\"ImageId\",\"EncodedPixels\"])\n            for key, value in dict_pred_nuclei.items():\n                for pred_enc_xy in value:\n                    str_enc_xy = \" \".join(str(x) for x in pred_enc_xy)\n                    writer.writerow([key, str_enc_xy])",
    "1996954": "Hello, have you found the error?"
  },
  "source": "meta"
}