mintproject / mic

Model Insertion Checker
https://mic-cli.readthedocs.io/en/latest/
5 stars 3 forks source link

[waiting review} mic encapsulate wrapper fails #168

Closed dgarijo closed 4 years ago

dgarijo commented 4 years ago

I created a component with an input and an output (manually). When I executed mic encapsulate wrapper MIC fails:

mic encapsulate wrapper
Traceback (most recent call last):
  File "/usr/local/bin/mic", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/mic/click_encapsulate/commands.py", line 321, in wrapper
    render_io_sh(mic_directory_path, inputs, parameters, configs)
  File "/usr/local/lib/python3.6/dist-packages/mic/component/initialization.py", line 112, in render_io_sh
    list_config = [value[PATH_KEY] for key, value in configs.items()]
AttributeError: 'list' object has no attribute 'items'
issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.98. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

mosoriob commented 4 years ago

Fixed

dgarijo commented 4 years ago

I still experience this issue after updating mic inside the image with pip install git+https://github.com/mintproject/mic.git@develop -U

full log:

root@aa847095904d:/tmp/mint# mic encapsulate inputs -f mic/mic.yaml /tmp/mint/DatasetSpecification.csv
Ignoring the config /tmp/mint/testScript.py as a input.
Input added: /tmp/mint/mic/data/DatasetSpecification.csv
Compressing the input /tmp/mint/Data
Input added: /tmp/mint/mic/data/Data.zip
Input added: /tmp/mint/mic/data/DatasetSpecification.csv
Writing inputs metadata
root@aa847095904d:/tmp/mint# mic encapsulate outputs -f mic/mic.yaml /tmp/mint/result.txt
Writing output metadata
Output added: /tmp/mint/result.txt
Output added: /tmp/mint/result.txt
root@aa847095904d:/tmp/mint# mic encapsulate wrapper -f mic/mic.yaml
Traceback (most recent call last):
  File "/usr/local/bin/mic", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/mic/click_encapsulate/commands.py", line 326, in wrapper
    render_io_sh(mic_directory_path, inputs, parameters, configs)
  File "/usr/local/lib/python3.8/site-packages/mic/component/initialization.py", line 112, in render_io_sh
    list_config = [value[PATH_KEY] for key, value in configs.items()]
AttributeError: 'list' object has no attribute 'items'
dgarijo commented 4 years ago

Files used for test attached mic_test_python.zip

dgarijo commented 4 years ago

What am I being assigned here?

mosoriob commented 4 years ago

I was waiting for your review but the unit test is enough.