Closed iaindillingham closed 3 years ago
As far as I can tell, the additional information on codelists has now been documented following #453; feel free to re-open if that's not the case.
Adding a better error message is opensafely-core/opensafely-cli#67 and still remains to be fix, but that issue remains open.
A researcher tried to comment-out lines in codelists.json. JSON doesn't allow comments (Douglas Crockford thought they were being misused), so cohort-extractor raised a
JSONDecodeError
.If we were to stop here, then a solution to this issue might be to have cohort-extractor raise a more informative error message, possibly of a different type.
Let's not stop here. The researcher had added (and possibly had removed) codelists from https://www.opencodelists.org/ to codelist.txt, but hadn't run
opensafely codelists update
(although the researcher had run this command before, so they were aware that this command existed).Is the underlying issue that the purpose of codelists.json isn't clear? It isn't documented in Adding codelists to a project, for example.
We should also mention that the CSVs containing the codelists shouldn't be edited, because they will be clobbered the next time
opensafely codelists update
is run.