Index: src/sas/sasgui/perspectives/invariant/invariant_panel.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -318,10 +318,10 @@
         background = self.background_tcl.GetValue().lstrip().rstrip()
         if background == "":
-            raise ValueError, "Need a background"
+            raise ValueError("Need a background")
         if check_float(self.background_tcl):
             return float(background)
         else:
             msg = "Receive invalid value for background : %s" % (background)
-            raise ValueError, msg
+            raise ValueError(msg)
 
     def get_scale(self):
@@ -331,5 +331,5 @@
         scale = self.scale_tcl.GetValue().lstrip().rstrip()
         if scale == "":
-            raise ValueError, "Need a background"
+            raise ValueError("Need a background")
         if check_float(self.scale_tcl):
             if float(scale) <= 0.0:
@@ -337,8 +337,8 @@
                 self.scale_tcl.Refresh()
                 msg = "Receive invalid value for scale: %s" % (scale)
-                raise ValueError, msg
+                raise ValueError(msg)
             return float(scale)
         else:
-            raise ValueError, "Receive invalid value for scale : %s" % (scale)
+            raise ValueError("Receive invalid value for scale : %s" % (scale))
 
     def get_contrast(self):
@@ -389,5 +389,5 @@
                 self.volume_err_tcl.SetValue(format_number(None))
                 msg = "Error occurred computing volume "
-                msg += " fraction: %s" % sys.exc_value
+                msg += " fraction: %s" % sys.exc_info()[1]
                 wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                       info="error",
@@ -409,5 +409,5 @@
                 self.surface_err_tcl.SetValue(format_number(None))
                 msg = "Error occurred computing "
-                msg += "specific surface: %s" % sys.exc_value
+                msg += "specific surface: %s" % sys.exc_info()[1]
                 wx.PostEvent(self.parent, StatusEvent(status=msg, info="error",
                                                       type="stop"))
@@ -431,5 +431,5 @@
             self.invariant_total_err_tcl.SetValue(format_number(None))
             msg = "Error occurred computing invariant using"
-            msg += " extrapolation: %s" % sys.exc_value
+            msg += " extrapolation: %s" % sys.exc_info()[1]
             wx.PostEvent(self.parent, StatusEvent(status=msg, type="stop"))
 
@@ -454,5 +454,5 @@
                 self._manager.plot_theory(name="Low-Q extrapolation")
                 msg = "Error occurred computing low-Q "
-                msg += "invariant: %s" % sys.exc_value
+                msg += "invariant: %s" % sys.exc_info()[1]
                 wx.PostEvent(self.parent,
                              StatusEvent(status=msg, type="stop"))
@@ -462,5 +462,5 @@
                 self._manager.plot_theory(name="Low-Q extrapolation")
             except:
-                logger.error(sys.exc_value)
+                logger.error(sys.exc_info()[1])
 
     def get_high_qstar(self, inv, high_q=False):
@@ -488,5 +488,5 @@
                 self._manager.plot_theory(name="High-Q extrapolation")
                 msg = "Error occurred computing high-Q "
-                msg += "invariant: %s" % sys.exc_value
+                msg += "invariant: %s" % sys.exc_info()[1]
                 wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                       type="stop"))
@@ -496,5 +496,5 @@
                 self._manager.plot_theory(name="High-Q extrapolation")
             except:
-                logger.error(sys.exc_value)
+                logger.error(sys.exc_info()[1])
 
     def get_qstar(self, inv):
@@ -625,5 +625,5 @@
             scale = self.get_scale()
         except:
-            msg = "Invariant Error: %s" % (sys.exc_value)
+            msg = "Invariant Error: %s" % (sys.exc_info()[1])
             wx.PostEvent(self.parent, StatusEvent(status=msg, type="stop"))
             return
@@ -641,5 +641,5 @@
             inv, npts_high = self.set_extrapolation_high(inv=inv, high_q=high_q)
         except:
-            msg = "Error occurred computing invariant: %s" % sys.exc_value
+            msg = "Error occurred computing invariant: %s" % sys.exc_info()[1]
             wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                   info="warning", type="stop"))
@@ -652,5 +652,5 @@
             self.get_qstar(inv=inv)
         except:
-            msg = "Error occurred computing invariant: %s" % sys.exc_value
+            msg = "Error occurred computing invariant: %s" % sys.exc_info()[1]
             wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                   info="warning",
@@ -675,5 +675,5 @@
         except:
             msg = r_msg + "Error occurred computing invariant: %s" % \
-                                                            sys.exc_value
+                                                            sys.exc_info()[1]
             wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                   info="error",
@@ -685,5 +685,5 @@
             #compute surface and set value to txtcrtl
         except:
-            msg = "Error occurred computing invariant: %s" % sys.exc_value
+            msg = "Error occurred computing invariant: %s" % sys.exc_info()[1]
             wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                   info="warning",
@@ -695,5 +695,5 @@
 
         except:
-            msg = "Error occurred computing invariant: %s" % sys.exc_value
+            msg = "Error occurred computing invariant: %s" % sys.exc_info()[1]
             wx.PostEvent(self.parent, StatusEvent(status=msg,
                                                   info="warning",
@@ -847,5 +847,5 @@
             attr.SetValue(value)
         except:
-            logger.error("Invariant state: %s", sys.exc_value)
+            logger.error("Invariant state: %s", sys.exc_info()[1])
 
     def get_bookmark_by_num(self, num=None):
@@ -864,6 +864,6 @@
             _, _, current_state, comp_state = self.state.bookmark_list[int(num)]
         except:
-            logger.error(sys.exc_value)
-            raise ValueError, "No such bookmark exists"
+            logger.error(sys.exc_info()[1])
+            raise ValueError("No such bookmark exists")
 
         # set the parameters
@@ -959,5 +959,5 @@
                     self.state.clone_state()
         except:
-            logger.error(sys.exc_value)
+            logger.error(sys.exc_info()[1])
 
         self._set_undo_flag(True)
@@ -1003,5 +1003,5 @@
                 del self.state.state_list[str(i)]
             except:
-                logger.error(sys.exc_value)
+                logger.error(sys.exc_info()[1])
         # Enable the undo button if it was not
         self._set_undo_flag(True)
@@ -1068,5 +1068,5 @@
                 del self.state.state_list[str(i)]
             except:
-                logger.error(sys.exc_value)
+                logger.error(sys.exc_info()[1])
 
         # try to add new state of the text changes in the state_list
@@ -1083,5 +1083,5 @@
             self.state.state_list[str(self.state.state_num)] = self.state.clone_state()
         except:
-            logger.error(sys.exc_value)
+            logger.error(sys.exc_info()[1])
 
         self._set_undo_flag(True)
@@ -1105,5 +1105,5 @@
             self.state.state_list[str(self.state.state_num)] = self.state.clone_state()
         except:
-            logger.error(sys.exc_value)
+            logger.error(sys.exc_info()[1])
 
     def _get_input_list(self):
@@ -1114,6 +1114,6 @@
         compute_num = self.state.saved_state['compute_num']
         # find values and put into the input list
-        for key1, value1 in self.state.state_list[str(compute_num)].iteritems():
-            for key, _ in self.state.input_list.iteritems():
+        for key1, value1 in self.state.state_list[str(compute_num)].items():
+            for key, _ in self.state.input_list.items():
                 if key == key1:
                     self.state.input_list[key] = value1
