I created a service manifest file with improperly formatted JSON (I accidentally had left a trailing comma where there should not have been one). When I tried to run `git cl upload`, the script failed but did not generate a reasonable error message.
Eventually, I looked up the _GetOwnersFilesToCheckForIpcOwners function and was able to figure out my mistake. This error message should be improved so that future developers don't get stuck here.
>git cl upload
Running presubmit upload checks ...
Traceback (most recent call last):
File "/usr/local/google/depot_tools/git_cl.py", line 5983, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/google/depot_tools/git_cl.py", line 5965, in main
return dispatcher.execute(OptionParser(), argv)
File "/usr/local/google/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/usr/local/google/depot_tools/git_cl.py", line 5006, in CMDupload
return cl.CMDUpload(options, args, orig_args)
File "/usr/local/google/depot_tools/git_cl.py", line 1593, in CMDUpload
change=change)
File "/usr/local/google/depot_tools/git_cl.py", line 1527, in RunHook
gerrit_obj=self._codereview_impl.GetGerritObjForPresubmit())
File "/usr/local/google/depot_tools/presubmit_support.py", line 1423, in DoPresubmitChecks
results += executer.ExecPresubmitScript(presubmit_script, filename)
File "/usr/local/google/depot_tools/presubmit_support.py", line 1330, in ExecPresubmitScript
result = eval(function_name + '(*__args)', context)
File "<string>", line 1, in <module>
File "<string>", line 3062, in CheckChangeOnUpload
File "<string>", line 2682, in _CommonChecks
File "<string>", line 1793, in _CheckIpcOwners
File "<string>", line 1772, in _GetOwnersFilesToCheckForIpcOwners
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name enclosed in double quotes: line 9 column 6 (char 229)
Comment 1 by bugdroid1@chromium.org
, Mar 23 2018