JSON Error while reading ascii file

Issue #1374 invalid
Hank Yelany created an issue

Hello, I encountered this error while trying to import a character. This was the message in the daz_importer_errors.txt file:

ERROR:
JSON error while reading ascii file
"D:/My DAZ 3D Library 2/data/daz 3d/genesis 8/female/morphs/deviousdolls/blaire/fhmblaire.dsf"
Expecting value: line 20337 column 630 (char 858035)

Other characters were imported fine and without problems, so I tested an import using just the “Blaire” model. This error message came up:

ERROR:
JSON error while reading ascii file
"D:/My DAZ 3D Library 2/data/daz 3d/genesis 8/female/morphs/deviousdolls/blaire/phmblairepout.dsf"
Expecting value: line 5906 column 630 (char 331380)

I think there could be a problem with the Blaire morph files that I have, but when I poked around in the dsf files and went to “line 20337 column 630“ and “line 5906 column 630“ I didn’t know what to look for. It does seem to be right near the end of the files for both cases.

Sorry if this is a mistake on my end or just corrupt files. Attached are the dsf files.

Comments (7)

  1. Thomas Larsson repo owner

    Which version of the plugin are you using? There is a problem with illegal json syntax, but the plugin has handled that for a long time, and I can import these files without problems in the latest version. Since they contain morphs nothing happens if I use the Import DAZ button, but both files work fine with Import Custom Morphs.

    The syntax error is the comma at the end of the list. In json the last element in a list must be followed directly by a ]. The right bracket is there, very far to the right on the third line below, but the comma at the end of the line above is illegal. This glitch happens sometimes but the plugin is aware of it and loads the file with the bad comma removed.

                            [ 16501, -0.1567032, -0.06912231, -0.1830111 ],
                            [ 16502, 0.1503165, -0.1101074, -0.1793084 ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ]
                    },
                    "hd_url" : "/data/DAZ%203D/Genesis%208/Female/Morphs/DeviousDolls/Blaire/FHMBlaire.dhdm"
    

  2. Hank Yelany reporter

    Thanks for the quick response. I think my plugin version is 1.6.

    How should I resolve the issue? Do I just delete the comma manually and move the bracket?

    I didn’t know about Importing Custom Morphs, but the error came up with importing characters with the morph applied to it already if that makes sense? I can attach the duf file as well if that helps.

  3. Hank Yelany reporter

    I manually deleted the illegal commas in the dsf files and tried to import the character again and it worked. Thanks for the help! Should I mark this as resolved?

  4. Log in to comment