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

the converter doesn't work with the gsheet example #107

Open
djarecka opened this issue May 30, 2023 · 0 comments
Open

the converter doesn't work with the gsheet example #107

djarecka opened this issue May 30, 2023 · 0 comments

Comments

@djarecka
Copy link
Contributor

I've tried to use the sheets2linkml with the example of gsheet you provide, but I get the error:

(models_linkml) MacBook-Pro-2:linkml dorota$ sheets2linkml --gsheet-id 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ personinfo types prefixes -o personinfo_gsh.yaml
Traceback (most recent call last):
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/schemasheets/schemamaker.py", line 110, in merge_sheet
    self.add_row(row, schemasheet.table_config)
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/schemasheets/schemamaker.py", line 116, in add_row
    for element in self.row_focal_element(row, table_config):
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/schemasheets/schemamaker.py", line 372, in row_focal_element
    raise ValueError(f'Could not find a focal element for {row}')
ValueError: Could not find a focal element for {'record': '', 'field': 'id', 'key': 'yes', 'multiplicity': '1', 'range': 'string', 'parents': '', 'desc': 'any identifier', 'schema.org': 'identifier', 'wikidata': '', 'belongs': '', 'status': '', 'special': '', 'special2': '', 'notes': ''}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/dorota/miniconda3/envs/models_linkml/bin/sheets2linkml", line 8, in <module>
    sys.exit(convert())
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/schemasheets/schemamaker.py", line 651, in convert
    schema = sm.create_schema(list(tsv_files))
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/schemasheets/schemamaker.py", line 64, in create_schema
    self.merge_sheet(f, **kwargs)
  File "/Users/dorota/miniconda3/envs/models_linkml/lib/python3.9/site-packages/schemasheets/schemamaker.py", line 113, in merge_sheet
    raise SchemaSheetRowException(f'Error in line {line_num}, row={row}') from e
schemasheets.schemamaker.SchemaSheetRowException: Error in line 3, row={'record': '', 'field': 'id', 'key': 'yes', 'multiplicity': '1', 'range': 'string', 'parents': '', 'desc': 'any identifier', 'schema.org': 'identifier', 'wikidata': '', 'belongs': '', 'status': '', 'special': '', 'special2': '', 'notes': ''}

I've installed your package from pip, v0.1.21, python3.9, OSX.

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