I ran into this same error regarding the CogAtlasID field when helping a trainee upload a dataset to OpenNeuro.
You might check the task-<taskname>_bold.json file that sits at the top level of your BIDS directory. That was the only json file that had the CogAtlasID field (default heudiconv value = “TODO”). Once we deleted that line from the task-<taskname>_bold.json file, the CogAtlasID error went away.
cheers.
suzanne