radiocosmology/cora

Bug in ConstrainedGalaxy when loading data.

Closed this issue · 0 comments

Not sure when this showed up, but this is now crashing my simulations.

Traceback:

Loading data for galaxy simulation.
Traceback (most recent call last):
  File "scripts/run_pipeline.py", line 20, in <module>
    P.run()
  File "/cita/h/home-3/kiyo/working/ch_analysis/pipeline/core.py", line 159, in run
    out = task._pipeline_next()
  File "/cita/h/home-3/kiyo/working/ch_analysis/pipeline/core.py", line 486, in _pipeline_next
    out = self.next(*args)
  File "/cita/h/home-3/kiyo/working/ch_analysis/pipeline/core.py", line 666, in next
    self.output_filename)
  File "/cita/h/home-3/kiyo/working/ch_analysis/pipeline/core.py", line 617, in read_process_write
    output = self.process()
  File "/cita/h/home-3/kiyo/working/ch_analysis/pipeline/drifttasks.py", line 107, in process
    simulations['galaxy'] = galaxy.ConstrainedGalaxy()
  File "/cita/h/home-3/kiyo/working/cora/cora/foreground/galaxy.py", line 64, in __init__
    self._load_data()
  File "/cita/h/home-3/kiyo/working/cora/cora/foreground/galaxy.py", line 75, in _load_data
    with np.load(_data_file) as f:
AttributeError: __exit__

Pretty obvious bug, but I'm not sure how this would have snuck in.