HumanBrainProject / fairgraph

High-level Python API for the EBRAINS Knowledge Graph
Apache License 2.0
10 stars 6 forks source link

`DatasetVersion.from_id()` returns `None` #63

Closed mih closed 1 week ago

mih commented 1 year ago
>>> omcore.DatasetVersion.from_id(
...     '242f7522-8553-4c4f-a067-0b79f0b02199', self.client)
None

I assumed this to be universally applicable and only error in case of wrong identifiers are lack of permissions. However

https://search.kg.ebrains.eu/instances/242f7522-8553-4c4f-a067-0b79f0b02199

Shows dataset info that seems to be inaccessible via fairgraph to me.

apdavison commented 1 year ago

a return value of None means either the object doesn't exist or you don't have permission to access it. This lack of distinction between the two comes from the KG.

In the case you mention, I can access it with both my main and testing account (the latter doesn't have many permissions).

ehennestad commented 1 year ago

I also have this problem with a dataset version I can view in the KG editor. This dataset version is unreleased, does that matter?

apdavison commented 1 year ago

If it is unreleased, you can try with .from_id(<uuid>, client, scope="in progress")

By default, scope is "released". You can also use scope="any" to try both scopes.

apdavison commented 1 week ago

An explanation of what a return value of None means should be added to the docstring of from_id().