abulka / vscode-snippet-creator

An extension to simplify the snippet creation
11 stars 2 forks source link

Errors on parsing current python snippet file: 'PropertyNameExpected' error at offset 1313, 'ValueExpected' error at offset 1313 #3

Closed GuokaiLiu closed 3 years ago

GuokaiLiu commented 3 years ago

Hi abulka

Thanks for this great project : )

Here is the error I met when try to make a snippet.

Errors on parsing current python snippet file: 'PropertyNameExpected' error at offset 1313, 'ValueExpected' error at offset 1313

Everything went well this morning but failed this afternoon.

Thanks.

GuokaiLiu commented 3 years ago

As a freshman with VSCode, to the coder who has the same issue, before you create a snippet: please confirm that there is no comma left after your final snippet in the .json file.

"testtorch": {
            "prefix": "testtorch",
            "body": [
                "import torch",
                "",
                "print(torch.rand(10))",
                "",
                "print(torch.rand(5))"
            ],
            "description": "description for testtorch"
        },

The final comma should be deleted.