cmungall / mixs-source

https://cmungall.github.io/mixs-source/
2 stars 3 forks source link

'exact_mappings' is not defined for gsctools.mixs_converter #5

Closed turbomam closed 2 years ago

turbomam commented 2 years ago
pipenv run python -m gsctools.mixs_converter

Traceback (most recent call last): File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/MAM/Documents/gitrepos/mixs-source/gsctools/mixs_converter.py", line 495, in cli() File "/Users/MAM/.local/share/virtualenvs/mixs-source-ag2AQfeD/lib/python3.9/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/Users/MAM/.local/share/virtualenvs/mixs-source-ag2AQfeD/lib/python3.9/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/Users/MAM/.local/share/virtualenvs/mixs-source-ag2AQfeD/lib/python3.9/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/Users/MAM/.local/share/virtualenvs/mixs-source-ag2AQfeD/lib/python3.9/site-packages/click/core.py", line 610, in invoke return callback(args, **kwargs) File "/Users/MAM/Documents/gitrepos/mixs-source/gsctools/mixs_converter.py", line 491, in cli cv.convert_and_save('model/schema/mixs.yaml') File "/Users/MAM/Documents/gitrepos/mixs-source/gsctools/mixs_converter.py", line 144, in convert_and_save obj = self.convert() File "/Users/MAM/Documents/gitrepos/mixs-source/gsctools/mixs_converter.py", line 336, in convert s_id, slot = self.create_slot(row, enums=enums) File "/Users/MAM/Documents/gitrepos/mixs-source/gsctools/mixs_converter.py", line 229, in create_slot if len(exact_mappings) > 0: NameError: name 'exact_mappings' is not defined make: *** [model/schema/mixs.yaml] Error 1

turbomam commented 2 years ago

After commenting out

        if len(exact_mappings) > 0:
            slot['exact_mappings'] = exact_mappings

pipenv run python -m gsctools.mixs_converter seems to create new YAML files in model/schema but there are lots of warnings

ERROR:root:No name: WARNING:root:No section: samp_name WARNING:root:No section: project_name WARNING:root:No section: alt ...

Still doesn't explain why that exact_mappings section"has" to be commented out

turbomam commented 2 years ago

Hasn't recurred.