-
Notifications
You must be signed in to change notification settings - Fork 5
Error like "json.decoder.JSONDecodeError: Extra data: line 6 column 6 (char 142)"
Error message:
File "1_build_database.py", line 46, in <module> config_dataset = MILK.load_json('dataset.json') File "/home/sven/MILK/MILK/environment/initilize.py", line 14, in load_json data = json.load(f) File "/home/sven/.conda/envs/milk_sven/lib/python3.8/json/__init__.py", line 293, in load return loads(fp.read(), File "/home/sven/.conda/envs/milk_sven/lib/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/home/sven/.conda/envs/milk_sven/lib/python3.8/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 6 column 6 (char 142)
First line indicates there is aproblem with dataset.json. Last line indicates problem is in line 6, column 6. Happened in this case when deleting the meta data section in a dataset.json and forgetting to delete the closing "}" bracket. Syntax highlighting and comparing with the dataset.json in the example helped to find this.