Cannot load a FITS file from an HTTP URL
What happened:
Load a FITS file from a HTTP URL does not work.
Example of a YAML file using a HTTP URL:
photon_collection:
- name: load_image
func: pyxel.models.photon_collection.load_image
enabled: true
arguments:
image_file: https://gitlab.com/esa/pyxel-data/-/raw/master/examples/exposure/data/Pleiades_HST.fits
convert_to_photons: true
bit_resolution: 16
align: "center"
And the error message:
File /builds/esa/pyxel-data/env/lib/python3.11/site-packages/fsspec/registry.py:222, in get_filesystem_class(protocol)
220 register_implementation(protocol, _import_class(bit["class"]))
221 except ImportError as e:
--> 222 raise ImportError(bit["err"]) from e
223 cls = registry[protocol]
224 if getattr(cls, "protocol", None) in ("abstract", None):
ImportError: HTTPFileSystem requires "requests" and "aiohttp" to be installed
Solution:
Install aiohttp
!
Environment:
Output of pyxel.show_versions()
INSTALLED VERSIONS
------------------
commit : 31b50cb57a087cb38e0f91cdbd9c7b64b1db5a9d
version : 1.9
python : 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:08:06) [GCC 11.3.0]
python-bits : 64
OS : Linux
OS-release : 5.15.0-69-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pyxel : 1.9
astropy : 5.3
asdf : 2.15.0
attrs : 22.2.0
bokeh : 3.1.1
cloudpickle : 2.2.1
dask : 2023.5.1
dask_jobqueue : None
distributed : 2023.5.1
fsspec : 2023.5.0
h5py : 3.8.0
holoviews : 1.16.0
ipywidgets : 8.0.2
jupyter : installed
jupyterlab : 3.4.8
matplotlib : 3.7.1
notebook : 6.4.12
numba : 0.57.0
numpy : 1.24.3
pandas : 2.0.2
PIL : 9.5.0
poppy : 1.1.1
pygmo : 2.19.5
pympler : 1.0.1
scipy : 1.10.1
seaborn : 0.12.2
sep : 1.2.1
skimage : 0.20.0
tqdm : 4.65.0
typing-extensions: None
yaml : 6.0
xarray : 2023.5.0
datatree : 0.0.12
xlrd : 2.0.1
openpyxl : 3.1.2
netcdf4 : None
setuptools : 67.6.1
pip : 23.1.2
conda : None
black : None
blackdoc : None
flake8 : None
isort : None
mypy : None
pytest : None
tox : None
sphinx : None
Edited by Frederic Lemmel