caracal-pipeline / caracal

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

Object RepresenterError add Bcal table from BPOLY #1461

Open rubyvanrooyen opened 1 year ago

rubyvanrooyen commented 1 year ago

BPOLY table format is not yet supported in the mstranform functionality. To get around this issue and allow the pipeline to run through, a standard Bcal table is created manually. But adding it to the pipeline object seem to require a little more than updating the dictionary items. Some advice would be appreciated

2023-01-06 15:13:04 CARACal ERROR: cannot represent an object: 3C39_comet-1627186165_sdp_l0-1gc_primary.B1 [RepresenterError]

Refer issue #1419

rubyvanrooyen commented 1 year ago

Full traceback from log file:

2023-01-06 15:13:04 CARACal ERROR: Traceback (most recent call last):
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/bin/caracal/caracal/main.py", line 187, in __run
2023-01-06 15:13:04 CARACal ERROR:     pipeline.run_workers()
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/bin/caracal/caracal/workers/worker_administrator.py", line 441, in run_workers
2023-01-06 15:13:04 CARACal ERROR:     worker.worker(self, recipe, config)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/bin/caracal/caracal/workers/crosscal_worker.py", line 789, in worker
2023-01-06 15:13:04 CARACal ERROR:     pipeline.save_callib(applycal_recipes, prefix_msbase)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/bin/caracal/caracal/workers/worker_administrator.py", line 267, in save_callib
2023-01-06 15:13:04 CARACal ERROR:     ruamel.yaml.dump(callib, f, ruamel.yaml.RoundTripDumper)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/main.py", line 1380, in dump
2023-01-06 15:13:04 CARACal ERROR:     block_seq_indent=block_seq_indent,
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/main.py", line 1321, in dump_all
2023-01-06 15:13:04 CARACal ERROR:     dumper._representer.represent(data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 80, in represent
2023-01-06 15:13:04 CARACal ERROR:     node = self.represent_data(data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 103, in represent_data
2023-01-06 15:13:04 CARACal ERROR:     node = self.yaml_representers[data_types[0]](self, data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 321, in represent_dict
2023-01-06 15:13:04 CARACal ERROR:     return self.represent_mapping('tag:yaml.org,2002:map', data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 869, in represent_mapping
2023-01-06 15:13:04 CARACal ERROR:     node_value = self.represent_data(item_value)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 103, in represent_data
2023-01-06 15:13:04 CARACal ERROR:     node = self.yaml_representers[data_types[0]](self, data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 321, in represent_dict
2023-01-06 15:13:04 CARACal ERROR:     return self.represent_mapping('tag:yaml.org,2002:map', data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 869, in represent_mapping
2023-01-06 15:13:04 CARACal ERROR:     node_value = self.represent_data(item_value)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 103, in represent_data
2023-01-06 15:13:04 CARACal ERROR:     node = self.yaml_representers[data_types[0]](self, data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 321, in represent_dict
2023-01-06 15:13:04 CARACal ERROR:     return self.represent_mapping('tag:yaml.org,2002:map', data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 869, in represent_mapping
2023-01-06 15:13:04 CARACal ERROR:     node_value = self.represent_data(item_value)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 113, in represent_data
2023-01-06 15:13:04 CARACal ERROR:     node = self.yaml_representers[None](self, data)
2023-01-06 15:13:04 CARACal ERROR:   File "/home/ruby/research_and_development/bpolydevel/venv3.7/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 354, in represent_undefined
2023-01-06 15:13:04 CARACal ERROR:     raise RepresenterError(_F('cannot represent an object: {data!s}', data=data))
2023-01-06 15:13:04 CARACal ERROR: ruamel.yaml.representer.RepresenterError: cannot represent an object: 3C39_comet-1627186165_sdp_l0-1gc_primary.B1
Athanaseus commented 6 months ago

Needs further testing. Bpoly table not supported yet. @SpaceMeerkat will help with this.