caracal-pipeline / caracal

Containerized Automated Radio Astronomy Calibration (CARACal) pipeline
GNU General Public License v2.0
28 stars 6 forks source link

ddcal worker fails with " ImportError: cannot import name 'write_ds9' from 'regions' " #1581

Open a-benati opened 2 months ago

a-benati commented 2 months ago

Hello,

the ddcal worker fails when importing write_ds9 from regions. I checked the code and it says that the relative line should be rewritten since write_ds9 does not exist anymore (line 273 of ddcal_worker.py). Has anyone solved this already?

Thanks, Alessandro Benati

Athanaseus commented 2 months ago

Hi @a-benati,

Thanks for opening the issue. Currently, this is resolved by pinning the version of regions==0.7. It should be the case if you are running with the latest caracal release version or even master installed using the poetry.lock file. Please confirm the version of caracal and the installation steps used.

Best regards

a-benati commented 2 months ago

Hi @Athanaseus,

thanks for your answer. I am working with caracal version 1.1.3 and I have installed it through singularity. The output of the command pip freeze | grep regions is: regions==0.7, which I think means that I already have that version of regions.

Athanaseus commented 2 months ago

Yes, that's right. Sorry, this was meant to be regions==0.5. Try the above. In the meantime, I'll push a fix with the latest regions, and you can help test it also.

Athanaseus commented 2 months ago

@a-benati please checkout update_regions branch or pip install git+https://github.com/caracal-pipeline/caracal.git@update_regions

a-benati commented 2 months ago

@Athanaseus thank you very much for your help. I managed to solve the issue by pinning the version of regions==0.5. As long as my current run finishes, I will also test the new version of the code.