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

get_instances() should return empty list instead of Exception #74

Open
bbartley opened this issue Mar 22, 2023 · 0 comments
Open

get_instances() should return empty list instead of Exception #74

bbartley opened this issue Mar 22, 2023 · 0 comments

Comments

@bbartley
Copy link
Contributor

bbartley commented Mar 22, 2023

When a term has no instances, the current behavior is to throw an Exception.

>>> tyto.SO.promoter.get_instances()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bbartley/Dev/git/Owlet/tyto/tyto.py", line 253, in get_instances
    return self.ontology._handler('get_instances', None, self)
  File "/Users/bbartley/Dev/git/Owlet/tyto/tyto.py", line 72, in _handler
    response = method(self, *args)
  File "/Users/bbartley/Dev/git/Owlet/tyto/endpoint/endpoint.py", line 215, in get_instances
    raise Exception(f'{cls} has no instances')
Exception: https://identifiers.org/SO:0000167 has no instances
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