Open PeterParkerPeng opened 2 months ago
I test the example code in "blend",but go wrong.
UnboundLocalError Traceback (most recent call last) Cell In[57], line 4 2 b.prepare_file() 3 b.run_moog() ----> 4 b.read_output()
File /opt/anaconda3/lib/python3.12/site-packages/pymoog/blends.py:84, in blends.read_output(self, remove) 81 # print(begin_index, end_index) 82 break ---> 84 blends_s_df = private.pd.DataFrame(private.np.array([ele.split() for ele in blends_content[begin_index+1:end_index]], dtype=float), columns=blends_content[begin_index].split()) 85 # Exclude the lines with no measurement. 86 blends_s_df = blends_s_df[blends_s_df['abund'] != 999.99].reset_index(drop=True)
UnboundLocalError: cannot access local variable 'begin_index' where it is not associated with a value
I test the example code in "blend",but go wrong.
error tips like:
UnboundLocalError Traceback (most recent call last) Cell In[57], line 4 2 b.prepare_file() 3 b.run_moog() ----> 4 b.read_output()
File /opt/anaconda3/lib/python3.12/site-packages/pymoog/blends.py:84, in blends.read_output(self, remove) 81 # print(begin_index, end_index) 82 break ---> 84 blends_s_df = private.pd.DataFrame(private.np.array([ele.split() for ele in blends_content[begin_index+1:end_index]], dtype=float), columns=blends_content[begin_index].split()) 85 # Exclude the lines with no measurement. 86 blends_s_df = blends_s_df[blends_s_df['abund'] != 999.99].reset_index(drop=True)
UnboundLocalError: cannot access local variable 'begin_index' where it is not associated with a value