Closed thewtex closed 2 years ago
Thanks @thewtex for the PR 👍
ipfsspec
should indeed raise FileNotFoundError
in this case. Could you add a check if the response code was 404 and re-raise the HTTPError
if not? Other codes would likely indicate some problems with the server or the connection, which we'd probably like to handle differently.
Please note that the async
branch has been merged, so normally, opening an ipfs://
url should now use the async implementation by default. I'm wondering why it didn't in your case...
Hi @d70-t !
ipfsspec should indeed raise FileNotFoundError in this case. Could you add a check if the response code was 404 and re-raise the HTTPError if not? Other codes would likely indicate some problems with the server or the connection, which we'd probably like to handle differently.
Yes, good point -- done.
Please note that the async branch has been merged, so normally, opening an ipfs:// url should now use the async implementation by default. I'm wondering why it didn't in your case..
I would love to use the async support, but it seems to hang? To reproduce:
git clone -b ipfsspec https://github.com/thewtex/spatial-image-multiscale
cd spatial-image-multiscale
pip install -e '.[test]'
pytest
zarr / fsspec tries to load a .zarray when opening to discover whether a group has a zarr array. fsspec expects a FileNotFoundError if it does not exist when attempting to cat this file. Raise the HTTP 404 as a FileNotFoundError.
This addresses the following backtrace: