mintproject / mic

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

mic step6 error #113

Closed dgarijo closed 4 years ago

dgarijo commented 4 years ago

I believe I have the latest version of MIC. I have followed steps 1-6 through the documentation. In step6, I get an error:

PS C:\Users\dgarijo\Documents\GitHub\newTestfolder\export_test> mic encapsulate step6
WARNING: You are using mic version 0.3.0, however version 0.4.1 is available.
You should consider upgrading via the 'pip install --upgrade mic' command.
{'stream': 'Step 1/1 : FROM mintproject/generic:20.5.1'}
{'stream': '\n'}
{'stream': ' ---> b2c1071e8a26\n'}
{'aux': {'ID': 'sha256:b2c1071e8a26d2b5d3d7cc398bbabb2ca9cc129984270ca3258efcd19b6a5485'}}
{'stream': 'Successfully built b2c1071e8a26\n'}
{'stream': 'Successfully tagged export_test:latest\n'}
Added: config.yml into the execution directory
The execution directory is available C:\Users\dgarijo\Documents\GitHub\newTestfolder\export_test\executions\06_01_19_50_16\src
2020-06-01 19:50:16,874 root         ERROR    Unable to cmd_line
Traceback (most recent call last):
  File "c:\users\dgarijo\documents\github\mic\src\mic\component\executor.py", line 116, in docker_run
    line = get_command_line(resource)
  File "c:\users\dgarijo\documents\github\mic\src\mic\component\executor.py", line 178, in get_command_line
    outputs = resource.has_output
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\modelcatalog\models\model_configuration.py", line 1216, in has_output
    return self._has_output
AttributeError: 'ModelConfiguration' object has no attribute '_has_output'
Traceback (most recent call last):
  File "C:\Users\dgarijo\Documents\GitHub\mic\Scripts\mic-script.py", line 11, in <module>
    load_entry_point('mic', 'console_scripts', 'mic')()
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\dgarijo\documents\github\mic\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\dgarijo\documents\github\mic\src\mic\__main__.py", line 325, in step6
    execute_using_docker(Path(mic_config_file))
  File "c:\users\dgarijo\documents\github\mic\src\mic\component\executor.py", line 107, in execute_using_docker
    docker_run(image, resource, src_dir)
  File "c:\users\dgarijo\documents\github\mic\src\mic\component\executor.py", line 119, in docker_run
    click.secho("Running \n {}".format(line), fg="green")
UnboundLocalError: local variable 'line' referenced before assignment

I attach my component. It's very simple: a python script which uses an input configuration file (which is defined as such with 1 parameter. MIC complains about has_output not being defined, but in theory that should be detected automatically. Am I missing something? export_test.zip