cannot access local variable 'ledStat'
Traceback (most recent call last):
File "/home/ooc/Softwares/csst-simulation/ObservationSim/ObservationSim.py", line 105, in run_one_chip
chip, filt, tel, pointing = step_func(
^^^^^^^^^^
File "/home/ooc/Softwares/csst-simulation/ObservationSim/sim_steps/add_LED_flat.py", line 16, in add_LED_Flat
led_flat, ledstat, letts = led_obj.drawObj_LEDFlat(led_type_list=obs_param["LED_TYPE"], exp_t_list=obs_param["LED_TIME"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ooc/Softwares/csst-simulation/ObservationSim/MockObject/FlatLED.py", line 173, in drawObj_LEDFlat
return self.drawObj_LEDFlat_slitless(led_type_list=led_type_list, exp_t_list=exp_t_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ooc/Softwares/csst-simulation/ObservationSim/MockObject/FlatLED.py", line 165, in drawObj_LEDFlat_slitless
ledStat = ledStat[0:int(led_type[3:])-1]+nledStat+ledStat[int(led_type[3:]):]
^^^^^^^
UnboundLocalError: cannot access local variable 'ledStat' where it is not associated with a value
cannot access local variable 'ledStat' where it is not associated with a value
Failed simulation on step: led_calib_model
check running:1: pointing-0 chip-30 pid-89260 memory- 4.12GB
finished running chip#30...
time: 363825.75368881226 ms
Edited by BO ZHANG