psychoinformatics-de / datalad-hirni

DataLad extension for (semi-)automated, reproducible processing of (medical/neuro)imaging data
http://datalad.org
Other
5 stars 8 forks source link

datalad run-procedure cfg_hirni >> 'Dataset' object has no attribute 'meta_dump' #113

Closed ted-strauss-K1 closed 5 years ago

ted-strauss-K1 commented 5 years ago

Using datalad 0.12.0rc4 and datalad-hirni 0.0.3. After running datalad create hirni-bids to create an empty dataet, cd into the folder and run the following command. cfg_hirni appears to crash because of missing dataset attribute meta_dump. I got a similar error for 'meta_aggregate`, here: https://github.com/psychoinformatics-de/datalad-hirni/issues/112


# datalad run-procedure cfg_hirni
[INFO   ] Running procedure cfg_hirni 
[INFO   ] == Command start (output follows) ===== 
[WARNING] Found no aggregated metadata info file /path/to/hirni-bids/.datalad/metadata/aggregate_v1.json. You will likely need to either update the dataset from its original location or reaggregate metadata locally. 
[WARNING] Dataset at . contains no aggregated metadata on this path [metadata(/path/to/hirni-bids)] 
[WARNING] Could not obtain dataset metadata, proceeding without 
[INFO   ] Cloning https://github.com/psychoinformatics-de/hirni-toolbox.git [1 other candidates] into '/path/to/hirni-bids/code/hirni-toolbox' 
[INFO   ]   Remote origin not usable by git-annex; setting annex-ignore                                      
Traceback (most recent call last):                                                                           
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad_hirni/resources/procedures/cfg_hirni.py", line 94, in <module>                                                                                             
    "procedure-call": "bash {script} {{location}} {ds}/README"
  File "/root/env/datalad2/lib/python3.6/site-packages/wrapt/wrappers.py", line 603, in __call__
    args, kwargs)
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad/distribution/dataset.py", line 527, in apply_func
    return f(**kwargs)
  File "/root/env/datalad2/lib/python3.6/site-packages/wrapt/wrappers.py", line 564, in __call__
    args, kwargs)
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad/interface/utils.py", line 490, in eval_func
    return return_func(generator_func)(*args, **kwargs)
  File "/root/env/datalad2/lib/python3.6/site-packages/wrapt/wrappers.py", line 564, in __call__
    args, kwargs)
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad/interface/utils.py", line 478, in return_func
    results = list(results)
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad/interface/utils.py", line 427, in generator_func
    result_renderer, result_xfm, _result_filter, **_kwargs):
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad/interface/utils.py", line 520, in _process_results
    for res in results:
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad_hirni/commands/spec4anything.py", line 142, in __call__
    ds_meta = dataset.meta_dump(reporton='datasets',
  File "/root/env/datalad2/lib/python3.6/site-packages/datalad/distribution/dataset.py", line 229, in __getattr__
    return super(Dataset, self).__getattribute__(attr)
AttributeError: 'Dataset' object has no attribute 'meta_dump'
[INFO   ] == Command exit (modification check follows) ===== 
CommandError: command 'python "/root/env/datalad2/lib/python3.6/site-packages/datalad_hirni/resources/procedures/cfg_hirni.py" "/path/to/hirni-bids" ' failed with exitcode 1
Failed to run 'python "/root/env/datalad2/lib/python3.6/site-packages/datalad_hirni/resources/procedures/cfg_hirni.py" "/path/to/hirni-bids" ' under '/path/to/hirni-bids'. Exit code=1.
mih commented 5 years ago

setup.py lacks a tight-enough versioned dependency on datalad-metalad. I will make a release shortly and fix this up. Thx for reporting.

mih commented 5 years ago

The release is out https://github.com/datalad/datalad-metalad/releases/tag/0.2.0

Dependencies can be adjusted.

ted-strauss-K1 commented 5 years ago

Thanks. Will test it first thing on Monday.