caracal-pipeline / caracal

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

Issues with ruamel #1554

Closed ifornax closed 2 weeks ago

ifornax commented 7 months ago

I installed carcal in a virtualenv using the instructions on the github (pip install -U caracal[all])

I have carcal version

(caracal_venv) nadeem@stevie:/data3/nadeem/MeerKAT_Halo_UHF/A3444/input$ caracal --version caracal version 1.0.7

I get the following error while running it on an existing yaml file

2023-12-06 15:08:58 CARACal ERROR: configuration file A3444_UHF.run1.yml fails to validate, list of errors follows:
  at top level:
    - 
"load()" has been removed, use

  yaml = YAML(typ='rt')
  yaml.load(...)

and register any classes that you use, or check the tag attribute on the loaded data,
instead of file "/data3/nadeem/caracal_venv/lib/python3.8/site-packages/caracal/dispatch_crew/config_parser.py", line 144

                config_content = ruamel.yaml.load(file, ruamel.yaml.RoundTripLoader, version=(1, 1))
Athanaseus commented 7 months ago

Hi @ifornax

Thank you for opening this issue.

This is due to the load() function being deprecated in YAML libraries. This affected caracal-1.0.7 because it wasn't pinned to depend on the last working version of yaml. For now, try downgrading ruamel.yaml to 0.17.21 or just installing the master with: pip install -U 'caracal[all] @ git+https://github.com/caracal-pipeline/caracal.git@master'

This will be resolved in the next planned CARACal release version.

Regards

Athanaseus commented 2 weeks ago

Please re-open if still experiencing the issue in the latest release 1.1.3.