#1265·InternVL

[Bug] Invalid JSON format in `debug_mpo.json` causes JSONDecodeError

Author: xueyunfeng123Created Mar 17, 2026Updated Mar 17, 2026

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

I encountered a JSONDecodeError when loading the dataset configuration file:

python
ds_collections = json.loads(open("shell/data/debug_mpo.json").read())

The error message is:

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 16 column 1 (char 572)

Root Cause:

The file shell/data/debug_mpo.json contains a trailing comma after the last element, which makes it invalid JSON.

Suggested Fix:

Remove the trailing comma in the JSON file:

json
{
    "m3cot_train_extracted_pairs_vqa_format_rules": {
        "root": "MMPR-v1.2/images/M3CoT",
        "annotation": "MMPR-v1.2/annotations/m3cot_train_extracted_pairs_vqa_format_rules.jsonl",
        "data_augment": false,
        "repeat_time": 1,
        "length": 201
    }
}

Reproduction

python
internvl_chat_gpt_oss/shell/internvl3_5_qwen3/internvl3_5_4b_mpo.sh

Environment

bash
it is not important

Error traceback

bash
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 16 column 1 (char 572)