Skip to content

Instantly share code, notes, and snippets.

@gaurav
Last active May 12, 2021
Embed
What would you like to do?
linkml-classes-bug
name: linkml_classes_bug
id: http://example.org/
license: https://creativecommons.org/publicdomain/zero/1.0/
prefixes:
linkml: https://w3id.org/linkml/
imports:
- linkml:types
classes:
- name: Entity
attributes:
- name: id
- name: description
$ pipenv install linkml==0.0.7
Creating a Pipfile for this project...
Installing linkml==0.0.7...
Adding linkml to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success!
Updated Pipfile.lock (2ac5e3)!
Installing dependencies from Pipfile.lock (2ac5e3)...
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
$ pipenv run gen-json-schema linkml-classes-bug.yaml
Traceback (most recent call last):
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/bin/gen-json-schema", line 8, in <module>
sys.exit(cli())
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/generators/jsonschemagen.py", line 116, in cli
print(JsonSchemaGenerator(yamlfile, **kwargs).serialize(**kwargs))
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/generators/jsonschemagen.py", line 19, in __init__
super().__init__(schema, **kwargs)
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/utils/generator.py", line 89, in __init__
loader = SchemaLoader(schema, self.base_dir, useuris=useuris, importmap=importmap, logger=self.logger,
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/utils/schemaloader.py", line 51, in __init__
self.schema = load_raw_schema(data, base_dir=base_dir, merge_modules=mergeimports,
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/utils/rawloader.py", line 77, in load_raw_schema
return load_raw_schema(f, fname, time.ctime(os.path.getmtime(fname)), os.path.getsize(fname), base_dir,
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/utils/rawloader.py", line 124, in load_raw_schema
check_is_dict(e)
File "/Users/gaurav/.local/share/virtualenvs/linkml-classes-bug-U_y4C7eF/lib/python3.9/site-packages/linkml/utils/rawloader.py", line 107, in check_is_dict
raise ValueError(f'Schema: {body_schemaname} - Element: {element} must be a dictionary')
ValueError: Schema: linkml_classes_bug - Element: classes must be a dictionary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment