Closed thomasgaudin-astro closed 2 years ago
Thanks for the bug report, I'll look into this!
Okay, this sounds like an error with the HDF5 read/write code for emulator loading, but I can't recreate this locally. Can you please paste your
1: Python version: 3.8.5 2: Starfish version: 0.4.0, pip installed 3: h5py version: 2.10.0
ah okay, can you try upgrading the h5py version you're using? In Starfish/setup.py
the minimum version is 3.0.0
, so there's something weird happening in your environment.
$ pip install -U h5py
$ python -c 'import h5py; print(h5py.__version__)'
3.6.0
What I've done is used a docker container (clean install) and installed
$ pip install astrostarfish
just like this, I can follow the tutorial in the docs without issue (also running pytest
succeeds)
Now, if I manually demote to h5py 2.10.0
$ sudo apt update && sudo apt install libhdf5-dev
$ pip install h5py==2.10.0
this error is something that should be heeded!
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
astrostarfish 0.4.0 requires h5py==3.*, but you have h5py 2.10.0 which is incompatible
and now I cannot load the emulator, recreating your error.
I am following the example notebooks included with the code and I keep running into a TypeError when I try to build my spectrum model. I am running the following SpectrumModel class object:
model = SpectrumModel(emu, data, grid_params = [3500.0, 5.0, 0.0], Av=0, global_cov=dict(log_amp=38, log_ls=2))
When I then try to call or print
model
, I get the following error:TypeError: a bytes-like object is required, not 'str'
I have looked for a byte-object that is attempting to be read as a string. This error is repeatable using multiple emulators and data files. It is also repeatable in both Jupyter Notebooks and Spyder. Alleviating the issue will be required in order to plot or train the model.