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

forge._model.schema_id is bucket dependent #372

Open
lecriste opened this issue Jan 16, 2024 · 0 comments
Open

forge._model.schema_id is bucket dependent #372

lecriste opened this issue Jan 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lecriste
Copy link
Collaborator

from kgforge.core import KnowledgeGraphForge
config = "https://raw.githubusercontent.com/BlueBrain/nexus-forge/master/examples/notebooks/use-cases/prod-forge-nexus.yml"
forge_1 = KnowledgeGraphForge(config, bucket="bbp/atlasdatasetrelease", token=TOKEN)
forge_1._model.schema_id("CellComposition")
'https://neuroshapes.org/dash/cellcomposition'

but

forge_2 = KnowledgeGraphForge(config, bucket="bbp/atlas", token=TOKEN)
forge_2._model.schema_id("CellComposition")
Traceback (most recent call last):
  File "/gpfs/bbp.cscs.ch/home/lcristel/venv/lib/python3.9/site-packages/kgforge/specializations/models/rdf_model.py", line 105, in schema_id
    shape_iri = self.service.types_to_shapes[type]
KeyError: 'CellComposition'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gpfs/bbp.cscs.ch/home/lcristel/venv/lib/python3.9/site-packages/kgforge/specializations/models/rdf_model.py", line 108, in schema_id
    raise ValueError("type not found")
ValueError: type not found
@lecriste lecriste added the bug Something isn't working label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant