Closed ocdtrekkie closed 9 years ago
Does your settings.json validate? Try it.
On 22 May 2015 17:00, Jacob Weisz notifications@github.com wrote:
I am getting this error when attempting to run this using the instructions on the readme. I looked at the settings.json file and it appears valid to me, so I'm not sure if I did something wrong or there's a bug. If you know what might cause this, I'd appreciate the advice.
— Reply to this email directly or view it on GitHubhttps://github.com/JohnMcLear/draw/issues/189.
My settings.json file seems to be the exact contents of settings.json.template in the repo. (Such and such validators specify that the file "is not JSON". Deleting the settings.json file and rerunning it recreates it similarly and it fails again.
Sounds like it isn't...
On 22 May 2015 17:36, Jacob Weisz notifications@github.com wrote:
My settings.json file seems to be the exact contents of settings.json.template in the repo. (Such and such validators specify that the file "is not JSON".
— Reply to this email directly or view it on GitHubhttps://github.com/JohnMcLear/draw/issues/189#issuecomment-104706927.
That appears to be the case.
So, your settings.json.template is not valid JSON either then, if I understand correctly. And if I understand the code correctly, the installDeps.sh file in your /bin seems to just copy the template to the settings file, if it doesn't exist.
So, from my understanding, JSON cannot have comments: http://stackoverflow.com/questions/244777/can-i-comment-a-json-file
settings.json.template, however, states that comments are allowed, and it has comments. And the installDeps.sh file does not appear to strip them when creating settings.json.
Ah, I see EtherDraw removes comments here: https://github.com/JohnMcLear/draw/commit/e3f9a6752b66e299de9f4f230b5030a5a2eb7761
Which is why settings.json, as created by EtherDraw, does not work correctly in a validator, but may/should work correctly in EtherDraw itself.
Okay, I just found the bug.
Your "tool" line, the last uncommented config line in settings.json.template, has a trailing comma, and it shouldn't.
Pull request #191 proposed to ensure this program works "out of the box" with readme instructions.
Shit.. Good spot. No idea how I missed that....
Thanks for fix
PS sorry for short responses last night I was afk
No problem, I got it working. Learned a thing or two figuring it out too.
I am getting this error when attempting to run this using the instructions on the readme. I looked at the settings.json file and it appears valid to me, so I'm not sure if I did something wrong or there's a bug. If you know what might cause this, I'd appreciate the advice.