grizli icon indicating copy to clipboard operation
grizli copied to clipboard

Missing variable in `parse_visits` raises error

Open nmearl opened this issue 6 years ago • 1 comments

When attempting to run the Grizli-Pipeline notebook, an error is raised missing local variables.

---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-13-7d2f87baf029> in <module>
      7 visits, all_groups, info = auto_script.parse_visits(field_root=root, 
      8                                                     HOME_PATH=HOME_PATH,
----> 9                                                     **kwargs['parse_visits_args'])
     10 
     11 print('\n ====== \n')

~/projects/grizli/grizli/pipeline/auto_script.py in parse_visits(field_root, HOME_PATH, use_visit, combine_same_pa, combine_minexp, is_dash, filters, max_dt)
   1010     files.sort()
   1011 
-> 1012     info = utils.get_flt_info(files)
   1013     #info = info[(info['FILTER'] != 'G141') & (info['FILTER'] != 'G102')]
   1014 

~/projects/grizli/grizli/utils.py in get_flt_info(files, columns)
    139         data.append(line)
    140 
--> 141     tab = Table(rows=data, names=has_columns)
    142     return tab
    143 

UnboundLocalError: local variable 'has_columns' referenced before assignment

nmearl avatar Nov 11 '19 18:11 nmearl

Thanks, @nmearl. I think the issue is that a previous pipeline step is not generating FLT files with calwf3 from the RAWs you've downloaded. The auto script is supposed to run my reprocess_wfc3 tools to regenerate the FLTs from the archive RAWs and your run is probably failing that step silently and trying to move on even though no FLTs had been produced.

Can you check that you have all of the dependencies in environment.yml available, including reprocess_wfc3?

A remaining to-do item is to add some checking at the early steps to ensure that the expected products are available and fail gracefully / verbosely if not.

gbrammer avatar Nov 14 '19 14:11 gbrammer