ValueError: Expecting property name enclosed in double quotes
Closed this issue · 1 comments
jeremyhill-up commented
When installing this plugin in Sublime Text 3 build 3059, I am getting:
Traceback (most recent call last):
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\sublime_plugin.py", line 207, in on_load
callback.on_load(v)
File "tern in C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package", line 438, in on_load
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 148, in project_for_view
projects = all_projects()
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 130, in all_projects
result = [info(p) for p in projects_from_opened_files()]
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 130, in <listcomp>
result = [info(p) for p in projects_from_opened_files()]
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 136, in info
config = get_ternjs_config(project_id)
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 63, in get_ternjs_config
conf = json.load(open(project))
File "X/json/__init__.py", line 264, in load
File "X/json/__init__.py", line 309, in loads
File "X/json/decoder.py", line 352, in decode
File "X/json/decoder.py", line 368, in raw_decode
ValueError: Expecting property name enclosed in double quotes: line 20 column 3 (char 384)
Traceback (most recent call last):
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\sublime_plugin.py", line 549, in run_
return self.run(edit)
File "tern in C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package", line 486, in run
File "tern in C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package", line 398, in reload_ternjs
File "tern in C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package", line 394, in reset_all_projects
File "tern in C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package", line 327, in all_projects
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 130, in all_projects
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 130, in <listcomp>
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 136, in info
File "C:\Users\Jeremy\apps\Sublime Text 3 Beta\Data\Installed Packages\TernJS.sublime-package\ternjs\project.py", line 63, in get_ternjs_config
File "X/json/__init__.py", line 264, in load
File "X/json/__init__.py", line 309, in loads
File "X/json/decoder.py", line 352, in decode
File "X/json/decoder.py", line 368, in raw_decode
ValueError: Expecting property name enclosed in double quotes: line 20 column 3 (char 384)
Unfortunately this is preventing TernJS from working, it seems, as I am not getting expected autocomplete functionality. Any tips/tricks for me?
jeremyhill-up commented
Found the issue, here's the project config:
{
"folders": [ {
"follow_symlinks": true,
"path": "app"
}, {
"follow_symlinks": true,
"path": "src"
}, {
"follow_symlinks": true,
"path": "specs"
}, {
"follow_symlinks": true,
"path": "canned_data"
} ],
"ternjs": {
"exclude": [ "app/lib/**", "**/app/lib/**", "**/app/js/**", "node_modules/**" ],
"libs": [ "jquery", "browser", "ecma5" ]
},
"jsformat": {
// jsformat options
"preserve_newlines": true,
"space_in_paren": true,
"jslint_happy": false
}
}
I had copy/pasted the comment for jsformat there ('// jsformat options') from the defaults when setting up the project config. This appears to make the python parser for jSON very, very unhappy. Removing the comment addressed the issue.