CSIT-1110: Print NameError to reduce confusion
[csit.git] / resources / tools / presentation / generator_tables.py
index 8791ae5..f555fce 100644 (file)
@@ -43,9 +43,9 @@ def generate_tables(spec, data):
     for table in spec.tables:
         try:
             eval(table["algorithm"])(table, data)
-        except NameError:
-            logging.error("The algorithm '{0}' is not defined.".
-                          format(table["algorithm"]))
+        except NameError as err:
+            logging.error("Probably algorithm '{alg}' is not defined: {err}".
+                          format(alg=table["algorithm"], err=repr(err))
     logging.info("Done.")
 
 
@@ -819,6 +819,8 @@ def table_performance_trending_dashboard(table, input_data):
         classification_lst = classify_anomalies(data_t, window=14)
 
         if classification_lst:
+            if isnan(rel_change_last) and isnan(rel_change_long):
+                continue
             tbl_lst.append(
                 [tbl_dict[tst_name]["name"],
                  '-' if isnan(last_median_t) else