Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with attributes column #128

Closed
djarecka opened this issue Feb 6, 2024 · 1 comment
Closed

issues with attributes column #128

djarecka opened this issue Feb 6, 2024 · 1 comment

Comments

@djarecka
Copy link
Contributor

djarecka commented Feb 6, 2024

I'm trying to use scheemasheet with attributes, e.g.:

Proposed  Field	Class Name
> attributes	class
tissue sample label	tissue sample
amplified cDNA label	amplified cdna

and I'm getting error:

Traceback (most recent call last):
  File "/Users/dorota/miniconda3/envs/schemasheets/bin/sheets2linkml", line 8, in <module>
    sys.exit(convert())
             ^^^^^^^^^
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/schemasheets/schemamaker.py", line 651, in convert
    schema = sm.create_schema(list(tsv_files))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/schemasheets/schemamaker.py", line 64, in create_schema
    self.merge_sheet(f, **kwargs)
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/schemasheets/schemamaker.py", line 110, in merge_sheet
    self.add_row(row, schemasheet.table_config)
  File "/Users/dorota/miniconda3/envs/schemasheets/lib/python3.11/site-packages/schemasheets/schemamaker.py", line 152, in add_row
    setattr(actual_element, cc.maps_to, getattr(actual_element, cc.maps_to, []) + v)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
TypeError: unsupported operand type(s) for +: 'dict' and 'list'

It works if I use slots

@djarecka djarecka changed the title attributes column is not supported issues with attributes column Feb 6, 2024
@djarecka
Copy link
Contributor Author

djarecka commented Feb 6, 2024

moved to #138

@djarecka djarecka closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant