Skip to content

Glance needs to handle data with no fill value gracefully.

When you try to analyze a variable that has no fill value defined Glance will crash with an assertion error. This is not a graceful way to handle data analysis, so regardless of whether we consider this to be faulty data, we shouldn't be crashing.

Here is an example assertion error traceback from Ray:

Traceback (most recent call last):
  File "/opt/conda/envs/glance/bin/glance", line 33, in <module>
    sys.exit(load_entry_point('uwglance==0.4.2', 'console_scripts', 'glance')())
  File "/opt/conda/envs/glance/lib/python3.8/site-packages/uwglance-0.4.2-py3.8.egg/glance/compare.py", line 1613, in main                                                                
    rc = lower_locals[args[0].lower()](*args[1:])
  File "/opt/conda/envs/glance/lib/python3.8/site-packages/uwglance-0.4.2-py3.8.egg/glance/compare.py", line 1394, in reportGen                                                           
    return reportGen_library_call(a_path, b_path, args[2:], tempOptions)
  File "/opt/conda/envs/glance/lib/python3.8/site-packages/uwglance-0.4.2-py3.8.egg/glance/compare.py", line 843, in reportGen_library_call                                               
    variable_stats = statistics.StatisticalAnalysis.withSimpleData(aData, bData,
  File "/opt/conda/envs/glance/lib/python3.8/site-packages/uwglance-0.4.2-py3.8.egg/glance/stats.py", line 880, in withSimpleData                                                         
    diffInfo    = dataobj.DiffInfoObject(aDataObject, bDataObject,
  File "/opt/conda/envs/glance/lib/python3.8/site-packages/uwglance-0.4.2-py3.8.egg/glance/data.py", line 326, in __init__                                                                
    self.diff_data_object = DiffInfoObject.analyze(aDataObject, bDataObject,
  File "/opt/conda/envs/glance/lib/python3.8/site-packages/uwglance-0.4.2-py3.8.egg/glance/data.py", line 416, in analyze                                                                 
    assert(fill_data_value is not None)
AssertionError