brainlife / cli

brainlife.io Command Line Interface (CLI)
https://brainlife.io
MIT License
2 stars 6 forks source link

Validation error during rois upload (validator-neuro-rois) #48

Open rjpuzniak opened 3 years ago

rjpuzniak commented 3 years ago

Hello, recently I've tried to upload several rois to BL using CLI, however I'm constantly encountering the error during data validation step, which prevents me for doing so. Below I'll describe the way I'm processing and what happens: 1) I create a folder tmp which contains a subfolder named rois (tmp/rois). Inside rois folder there are several files with binary masks, all in .nii.gz format 2) I'm uploading the data with given command


bl dataset upload --directory Tmp/${subj_BL}/tmp \
    --project $project_id \
    --datatype neuro/rois \
    --datatype_tag 'aligned' \
    --subject $subj_BL \
    --desc 'Test' \
    --tag  'test' \
    --force

3) On the terminal prompt I receive a following message

__dtv(brainlife/validator-neuro-rois)   Brain Life  
__dtv(brainlife/validator-neuro-rois)
 failed
loading error.log
(node:1954) UnhandledPromiseRejectionWarning: Error: Traceback (most recent call last):
  File "/mnt/datalad/upload/5fbf83ed47b8ca08393100cf/5fce6c3ad89d012ca55d0c19/validate.py", line 27, in <module>
    roispath=config["rois"]
KeyError: 'rois'

    at util.waitForFinish (/usr/lib/node_modules/brainlife/bl-dataset-upload.js:239:43)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:1954) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1954) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

4) I can't figure out why config variable has no field rois, nor what I can do to change that. I've also tried uploading the rois together with associated label.json, but this didn't make a difference. Thank You very much,

Robert

soichih commented 3 years ago

--directory is for uploading bids data. Since you are uploading an individual data object, please use --rois instead.

Like..

$ bl data upload --datatype neuro/rois --project (project ID) --subject (subject name) --rois (file path for rois) 

Also, "dataset" command is deprecated by "data" command. So please use that instead.

Lastly, I just released a new version of brainlife CLI (1.5.5). Please update your CLI if you have not done so recently.