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

[Bug][python] exists raises exception in cases when it should return False #1035

Closed
bkmartinjr opened this issue Mar 1, 2023 · 0 comments
Closed
Assignees

Comments

@bkmartinjr
Copy link
Member

Describe the bug

tiledbsoma.*.exists() is documented as return a False for any URI that does not exist. However, in many cases it will raise an exception instead of returning False.

Simple example: an unknown URI scheme, e.g, tiledbsoma.DataFrame.exists("foo://bar")

The typical pattern in Python (e.g., fsspec) is to swallow all exceptions and return False, e.g.,

In [26]: fsspec.AbstractFileSystem().exists("foo")
Out[26]: False

In [27]: fsspec.AbstractFileSystem().exists("foo://bar")
Out[27]: False

Root cause is the explicit except SOMAError catch in the exists implementation.

Versions (please complete the following information):

tiledbsoma.__version__    1.0.0rc2
tiledb.__version__        0.20.0
core version              2.14.0
python version            3.10.6.final.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants