lightkurve / lightkurve

A friendly package for Kepler & TESS time series analysis in Python.
https://lightkurve.github.io/lightkurve/
MIT License
419 stars 170 forks source link

Type error on stitch() #1373

Closed cmorsoc closed 1 year ago

cmorsoc commented 1 year ago

Problem description

An script to download lightkurves, which worked two years ago, doesn't work with current version of lightkurve. The line fails: lc_set = lk.search_lightcurve(star,author=catalog,cadence='long').download_all().stitch()

Error message: TypeError Traceback (most recent call last) Cell In[13], line 65 64 # ... ---> 65 lc_set = lk.search_lightcurve(star,author=catalog,cadence='long').download_all().stitch()

File ~/anaconda3/lib/python3.11/site-packages/lightkurve/collections.py:197, in LightCurveCollection.stitch(self, corrector_func) 195 with warnings.catch_warnings(): # ignore "already normalized" message 196 warnings.filterwarnings("ignore", message=".already.") --> 197 lcs = [corrector_func(lc) for lc in self] 199 # Address issue #954: ignore incompatible columns with the same name 200 columns_to_remove = set()

File ~/anaconda3/lib/python3.11/site-packages/lightkurve/collections.py:197, in (.0) 195 with warnings.catch_warnings(): # ignore "already normalized" message 196 warnings.filterwarnings("ignore", message=".already.") --> 197 lcs = [corrector_func(lc) for lc in self] 199 # Address issue #954: ignore incompatible columns with the same name 200 columns_to_remove = set() ...

Expected behavior

We should get the lightkurve data

Environment

Zorin Linux Pro 16.2 (Ubuntu) lightkurve 2.4.1

github-actions[bot] commented 1 year ago

Hi there! πŸ‘‹ Thank you for opening your first Lightkurve issue! πŸ™ One of our maintainers will get back to you as soon as possible. πŸ‘©β€πŸš€ You can expect a response within 7 days. πŸ“… If you haven’t heard anything by then, feel free to ping this thread. πŸ›ŽοΈ We love that you are using Lightkurve and appreciate your feedback. πŸ‘

orionlee commented 1 year ago

Please provide the specific example so that the problem can be reproduced. What is the star and catalog in the example?

lc_set = lk.search_lightcurve(star,author=catalog,cadence='long').download_all().stitch()
cmorsoc commented 1 year ago

Hi @orionlee, I'm sorry, it must be an issue with the local Python installation because It runs perfectly on Google Colab. Thanks, Carlos

orionlee commented 1 year ago

I'm closing the issue as it sound like to be an issue of corrupted environment. @cmorsoc , write back if you believe otherwise.