gaia-dpci / GaiaXPy

Gaia BP/RP spectra package
BSD 3-Clause "New" or "Revised" License
36 stars 9 forks source link

Error report when using calibrate with query input #89

Closed hezhao2024 closed 4 months ago

hezhao2024 commented 5 months ago

I got an error report when following the tutorial of using 'calibrate' module to get XP spectra. Tutorial reference: https://gaia-dpci.github.io/GaiaXPy-website/tutorials/Calibrator%20tutorial.html

My code following the tutorial:

query_input = "select TOP 2 source_id from gaiadr3.gaia_source where has_xp_continuous = 'True'"
calibrated_spectra, sampling = calibrate(query_input)
calibrated_spectra

Screenshots of the error report:

截屏2024-04-14 11 50 33 截屏2024-04-14 11 50 44

System: Mac OS Monterey 12.4 JupyterLab Python version: 3.9.7 gaiaxpy version: 2.1.0

druzm commented 5 months ago

Hello @hezhao2024

Thank you for the report. Did you install the package via pip? I've just pushed a fix for this issue to the dev branch of GaiaXPy. If you install the dev branch of the package from source instead, the problem should be gone.

The issue was caused by a difference in the table returned from the Archive. The program should be now more resilient to those changes.

hezhao2024 commented 5 months ago

Hi Daniela,

I cannot install GaiaXPy via the source because of an error report " No module named 'extension_helpers' ". I tried re-install with pip, the bug still exists.

Best regards, He

From: "Daniela Ruz-Mieres" @.> To: "gaia-dpci/GaiaXPy" @.> Cc: "He Zhao" @.>, "Mention" @.> Sent: Monday, April 15, 2024 12:08:45 PM Subject: Re: [gaia-dpci/GaiaXPy] Error report when using calibrate with query input (Issue #89)

Hello [ https://github.com/hezhao2024 | @hezhao2024 ]

Thank you for the report. Did you install the package via pip? I've just pushed a fix for this issue to the dev branch of GaiaXPy. If you install the dev branch of the package [ https://gaiaxpy.readthedocs.io/en/latest/installation.html#from-source | from source ] instead, the problem should be gone.

The issue was caused by a difference in the table returned from the Archive. The program should be now more resilient to those changes.

— Reply to this email directly, [ https://github.com/gaia-dpci/GaiaXPy/issues/89#issuecomment-2056450276 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/BGEZEPAQ76LISZVM354ZD6DY5ORK3AVCNFSM6AAAAABGGC64T6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJWGQ2TAMRXGY | unsubscribe ] . You are receiving this because you were mentioned. Message ID: <gaia-dpci/GaiaXPy/issues/89/2056450276 @ github . com>

druzm commented 5 months ago

Hi @hezhao2024 ,

Did you specifically clone the dev branch? If that's the case, with the virtual environment activated (as mentioned in the installation instructions), could you provide the output of the command pip freeze? It sounds like the problem is the version of one of the package dependencies.

Installing from PyPI won't fix the issue until a new release of the package is created.