Index: src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py
===================================================================
--- src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py	(revision 6ae74669a8e1dc1caf8f5be7dbb947be975651d9)
+++ src/sas/qtgui/Perspectives/Inversion/InversionPerspective.py	(revision aed159f2c55235b1eb207e55b5601081f66c913c)
@@ -473,5 +473,5 @@
             self._calculator.set_qmax(qmax)
             if np.size(self.logic.data.dy) == 0 or np.all(self.logic.data.dy) == 0:
-                self.logic.data.dy = self._calculator.add_errors(self.logic.data.y)
+                self._calculator.add_errors()
             self.updateDataList(data)
             self.populateDataComboBox(self.logic.data.filename, data)
Index: src/sas/qtgui/Utilities/GuiUtils.py
===================================================================
--- src/sas/qtgui/Utilities/GuiUtils.py	(revision 874875175cbb93b53c1b431ab154ab62644c5a69)
+++ src/sas/qtgui/Utilities/GuiUtils.py	(revision aed159f2c55235b1eb207e55b5601081f66c913c)
@@ -95,5 +95,4 @@
     except ImportError:
         pass
-        #logging.error("Error loading %s/%s: %s" % (path, confg_file, sys.exc_value))
     except ValueError:
         print("Value error")
@@ -102,5 +101,4 @@
         if fObj is not None:
             fObj.close()
-    #logging.info("GuiManager loaded %s/%s" % (path, confg_file))
     return config_module
 
Index: src/sas/sascalc/pr/fit/expression.py
===================================================================
--- src/sas/sascalc/pr/fit/expression.py	(revision 1431dabb37688a0fe2bc6a394e1fef79b843a32d)
+++ src/sas/sascalc/pr/fit/expression.py	(revision aed159f2c55235b1eb207e55b5601081f66c913c)
@@ -209,6 +209,5 @@
 """%("\n    ".join(assignments),"\n    ".join(code))
 
-    #print("Function: "+functiondef)
-    exec(functiondef) in globals, locals
+    exec(functiondef, globals, locals)
     retfn = locals['eval_expressions']
 
Index: src/sas/sascalc/pr/invertor.py
===================================================================
--- src/sas/sascalc/pr/invertor.py	(revision eeea6a3d116f83d83e3b689d46542bf558d77e09)
+++ src/sas/sascalc/pr/invertor.py	(revision aed159f2c55235b1eb207e55b5601081f66c913c)
@@ -227,17 +227,10 @@
         return None
 
-    def add_errors(self, yvalues):
-        """
-        Adds errors to data set is they are not avaialble
-        :return:
-        """
-        stats_errors = np.zeros(len(yvalues))
-        for i in range(len(yvalues)):
-            # Scale the error so that we can fit over several decades of Q
-            scale = 0.05 * np.sqrt(yvalues[i])
-            min_err = 0.01 * yvalues[i]
-            stats_errors[i] = scale * np.sqrt(np.fabs(yvalues[i])) + min_err
-        logger.warning("Simulated errors have been added to the data set\n")
-        return stats_errors
+    def add_errors(self, sigma=0.05):
+        """
+        Adds errors to data set is they are not available.
+        Uses  $\Delta y = \sigma | y |$.
+        """
+        self.dy = sigma * np.fabs(self.y)
 
     def clone(self):
@@ -514,5 +507,5 @@
             # We were not able to estimate the errors
             # Return an empty error matrix
-            logger.error(sys.exc_value)
+            logger.error(sys.exc_info()[1])
 
         # Keep a copy of the last output
@@ -559,5 +552,5 @@
             # number of terms
             best_alpha, _, _ = self.estimate_alpha(self.nfunc)
-            logger.warning("Invertor.estimate_numterms: %s" % sys.exc_value)
+            logger.warning("Invertor.estimate_numterms: %s" % sys.exc_info()[1])
             return self.nfunc, best_alpha, "Could not estimate number of terms"
 
@@ -646,5 +639,5 @@
 
         except:
-            message = "Invertor.estimate_alpha: %s" % sys.exc_value
+            message = "Invertor.estimate_alpha: %s" % sys.exc_info()[1]
             return 0, message, elapsed
 
@@ -763,5 +756,5 @@
 
             except:
-                msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value
+                msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_info()[1]
                 raise RuntimeError(msg)
         else:
