tomasstolker / species

Toolkit for atmospheric characterization of directly imaged exoplanets
https://species.readthedocs.io
MIT License
22 stars 10 forks source link

TypeCheckError: argument "deredden" (None) #70

Closed f4hzg closed 7 months ago

f4hzg commented 11 months ago

Following the Fitting data with a grid of model spectra tutorial with a fresh installation of species leads to the error attached. The error is triggered when calling database.add_companion(name='beta Pic b').

Setting deredden to Optional in species/data/database.py, line 824 solves the issue.

error.log

tomasstolker commented 11 months ago

Thanks for opening this issue!

I see that you are using Python 3.11, which is not yet supported by species. The error does not occur with version 3.10.

If you run into any further errors then I could recommend using Python 3.10, but I will try to add support for Python 3.11 soon!

f4hzg commented 11 months ago

Ok, thanks! I forgot to check on Python 3.10. As a note, though, that's the only problem I encountered so far. It was a bit of a pain to install via pip because of the unsatisfied dependencies (especially numba), but it mostly works on 3.11.

tomasstolker commented 11 months ago

The species package does now support Python 3.11, which has been added in PR #71 .

f4hzg commented 11 months ago

Hi Tomas! Not sure it's the best way to do it, but I'm reopening this issue. because I have a simillar problem. Also in Python 3.11, running the tutorial, it crashes when running the fit.run_multinest, with again a type check error: TypeCheckError: argument "spectrum" (None) is not a tuple error.log

tomasstolker commented 11 months ago

Thanks for reopening this issue!

I have checked all type annotations where the Optional may have been missing. I also rerun most of the notebook tutorials with Python 3.11 to check, so I think/hope that it should be fine now!

The fix is part of commit 4a56512 and the latest release of the package (v0.7.2).