Index: src/sas/perspectives/fitting/models.py
===================================================================
--- src/sas/perspectives/fitting/models.py	(revision 2f4b43041eaa7b7f496750f223a299cb33cd268e)
+++ src/sas/perspectives/fitting/models.py	(revision 415fb824f22c6e653a334cf7dae677b365067d1f)
@@ -6,5 +6,4 @@
 import os
 import sys
-import math
 import os.path
 # Time is needed by the log method
@@ -13,10 +12,8 @@
 import py_compile
 import shutil
-from sas.guiframe.events import StatusEvent
 # Explicitly import from the pluginmodel module so that py2exe
 # places it in the distribution. The Model1DPlugin class is used
 # as the base class of plug-in models.
 from sas.models.pluginmodel import Model1DPlugin
-from sas.models.BaseComponent import BaseComponent
 from sas.guiframe.CategoryInstaller import CategoryInstaller
 
@@ -24,4 +21,7 @@
 
 def get_model_python_path():
+    """
+        Returns the python path for a model
+    """
     return os.path.dirname(__file__)
 
@@ -60,5 +60,6 @@
     except:
         msg = "Plugin %s error in __init__ \n\t: %s %s\n" % (str(name),
-                                    str(sys.exc_type), sys.exc_value)
+                                                             str(sys.exc_type),
+                                                             sys.exc_info()[1])
         log(msg)
         return None
@@ -68,6 +69,6 @@
             value = new_instance.function()
         except:
-            msg = "Plugin %s: error writing function \n\t :%s %s\n " % (str(name),
-                                    str(sys.exc_type), sys.exc_value)
+            msg = "Plugin %s: error writing function \n\t :%s %s\n " % \
+                    (str(name), str(sys.exc_type), sys.exc_info()[1])
             log(msg)
             return None
@@ -126,4 +127,7 @@
 
 class ReportProblem:
+    """
+        Class to check for problems with specific values
+    """
     def __nonzero__(self):
         type, value, traceback = sys.exc_info()
@@ -145,6 +149,5 @@
                                quiet=report_problem)
     except:
-        type, value, traceback = sys.exc_info()
-        return value
+        return sys.exc_info()[1]
     return None
 
@@ -155,7 +158,7 @@
     # List of plugin objects
     plugins = {}
+    dir = find_plugins_dir()
     # Go through files in plug-in directory
     #always recompile the folder plugin
-    dir = find_plugins_dir()
     if not os.path.isdir(dir):
         msg = "SasView couldn't locate Model plugin folder."
@@ -166,5 +169,5 @@
         log("looking for models in: %s" % str(dir))
         compile_file(dir)
-        logging.info("pluging model dir: %s\n" % str(dir))
+        logging.info("plugin model dir: %s" % str(dir))
     try:
         list = os.listdir(dir)
@@ -186,10 +189,12 @@
                             msg = "Error accessing Model"
                             msg += "in %s\n  %s %s\n" % (name,
-                                    str(sys.exc_type), sys.exc_value)
+                                                         str(sys.exc_type),
+                                                         sys.exc_info()[1])
                             log(msg)
                 except:
                     msg = "Error accessing Model"
                     msg += " in %s\n  %s %s \n" % (name,
-                                    str(sys.exc_type), sys.exc_value)
+                                                   str(sys.exc_type),
+                                                   sys.exc_info()[1])
                     log(msg)
                 finally:
@@ -199,7 +204,6 @@
     except:
         # Don't deal with bad plug-in imports. Just skip.
-        msg = "Could not import model plugin: %s\n" % sys.exc_value
+        msg = "Could not import model plugin: %s" % sys.exc_info()[1]
         log(msg)
-        pass
     return plugins
 
@@ -247,5 +251,5 @@
     ## dictionary of structure factor models
     struct_factor_dict = {}
-    ##list of shape models -- this is superseded by categories 
+    ##list of shape models -- this is superseded by categories
 #    shape_list = []
     ## shape independent model list-- this is superseded by categories
@@ -278,5 +282,5 @@
         if self.is_changed():
             return  _findModels(dir)
-        logging.info("pluging model : %s\n" % str(temp))
+        logging.info("plugin model : %s" % str(temp))
         return temp
 
@@ -291,7 +295,7 @@
 
         ## NOTE: as of April 26, 2014, as part of first pass on fixing categories,
-        ## all the appends to shape_list or shape_independent_list are 
-        ## commented out.  They should be possible to remove.  They are in 
-        ## fact a "category" of model whereas the other list are actually 
+        ## all the appends to shape_list or shape_independent_list are
+        ## commented out.  They should be possible to remove.  They are in
+        ## fact a "category" of model whereas the other list are actually
         ## "attributes" of a model.  In other words is it a structure factor
         ## that can be used against a form factor, is it a form factor that is
@@ -302,6 +306,6 @@
         ## structure where each model will provide a method to interrogate it
         ## about its "attributes" -- then this long list becomes a loop reading
-        ## each model in the category list to populate the "attribute"lists.  
-        ## We should also refactor the whole category vs attribute list 
+        ## each model in the category list to populate the "attribute"lists.
+        ## We should also refactor the whole category vs attribute list
         ## structure when doing this as now the attribute lists think they are
         ## also category lists.
@@ -310,4 +314,5 @@
 
         # regular model names only
+        base_message = "Unable to load model {0}"
         try:
             self.model_name_list = []
@@ -318,5 +323,5 @@
             self.model_name_list.append(SphereModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(SphereModel.__name__))
 
         try:
@@ -326,5 +331,5 @@
             self.model_name_list.append(BinaryHSModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(BinaryHSModel.__name__))
 
         try:
@@ -335,5 +340,5 @@
             self.model_name_list.append(FuzzySphereModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(FuzzySphereModel.__name__))
 
         try:
@@ -343,5 +348,5 @@
             self.model_name_list.append(RaspBerryModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(RaspBerryModel.__name__))
 
         try:
@@ -353,5 +358,5 @@
             self.model_name_list.append(CoreShellModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CoreShellModel.__name__))
 
         try:
@@ -361,6 +366,6 @@
             self.model_name_list.append(Core2ndMomentModel.__name__)
         except:
-            pass
-
+            logging.error(base_message.format(Core2ndMomentModel.__name__))
+            
         try:
             from sas.models.CoreMultiShellModel import CoreMultiShellModel
@@ -370,5 +375,5 @@
             self.multi_func_list.append(CoreMultiShellModel)
         except:
-            pass
+            logging.error(base_message.format(CoreMultiShellModel.__name__))
 
         try:
@@ -379,5 +384,5 @@
             self.model_name_list.append(VesicleModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(VesicleModel.__name__))
 
         try:
@@ -388,5 +393,5 @@
             self.model_name_list.append(MultiShellModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(MultiShellModel.__name__))
 
         try:
@@ -397,5 +402,5 @@
             self.multi_func_list.append(OnionExpShellModel)
         except:
-            pass
+            logging.error(base_message.format(OnionExpShellModel.__name__))
 
         try:
@@ -407,5 +412,5 @@
             self.multi_func_list.append(SphericalSLDModel)
         except:
-            pass
+            logging.error(base_message.format(SphericalSLDModel.__name__))
 
         try:
@@ -416,5 +421,5 @@
             self.model_name_list.append(LinearPearlsModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LinearPearlsModel.__name__))
 
         try:
@@ -425,5 +430,5 @@
             self.model_name_list.append(PearlNecklaceModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(PearlNecklaceModel.__name__))
 
         try:
@@ -435,5 +440,5 @@
             self.model_name_list.append(CylinderModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CylinderModel.__name__))
 
         try:
@@ -445,5 +450,5 @@
             self.model_name_list.append(CoreShellCylinderModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CoreShellCylinderModel.__name__))
 
         try:
@@ -455,5 +460,5 @@
             self.model_name_list.append(CoreShellBicelleModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CoreShellBicelleModel.__name__))
 
         try:
@@ -465,5 +470,5 @@
             self.model_name_list.append(HollowCylinderModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(HollowCylinderModel.__name__))
 
         try:
@@ -474,5 +479,5 @@
             self.model_name_list.append(FlexibleCylinderModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(FlexibleCylinderModel.__name__))
 
         try:
@@ -483,5 +488,5 @@
             self.model_name_list.append(FlexCylEllipXModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(FlexCylEllipXModel.__name__))
 
         try:
@@ -493,5 +498,5 @@
             self.model_name_list.append(StackedDisksModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(StackedDisksModel.__name__))
 
         try:
@@ -503,5 +508,5 @@
             self.model_name_list.append(ParallelepipedModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(ParallelepipedModel.__name__))
 
         try:
@@ -513,5 +518,5 @@
             self.model_name_list.append(CSParallelepipedModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CSParallelepipedModel.__name__))
 
         try:
@@ -523,5 +528,5 @@
             self.model_name_list.append(EllipticalCylinderModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(EllipticalCylinderModel.__name__))
 
         try:
@@ -532,5 +537,5 @@
             self.model_name_list.append(CappedCylinderModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CappedCylinderModel.__name__))
 
         try:
@@ -542,5 +547,5 @@
             self.model_name_list.append(EllipsoidModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(EllipsoidModel.__name__))
 
         try:
@@ -552,5 +557,5 @@
             self.model_name_list.append(CoreShellEllipsoidModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CoreShellEllipsoidModel.__name__))
 
         try:
@@ -562,5 +567,5 @@
             self.model_name_list.append(CoreShellEllipsoidXTModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CoreShellEllipsoidXTModel.__name__))
 
         try:
@@ -572,5 +577,5 @@
             self.model_name_list.append(TriaxialEllipsoidModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(TriaxialEllipsoidModel.__name__))
 
         try:
@@ -581,5 +586,5 @@
             self.model_name_list.append(LamellarModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LamellarModel.__name__))
 
         try:
@@ -590,5 +595,5 @@
             self.model_name_list.append(LamellarFFHGModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LamellarFFHGModel.__name__))
 
         try:
@@ -599,5 +604,5 @@
             self.model_name_list.append(LamellarPSModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LamellarPSModel.__name__))
 
         try:
@@ -608,5 +613,5 @@
             self.model_name_list.append(LamellarPSHGModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LamellarPSHGModel.__name__))
 
         try:
@@ -617,5 +622,5 @@
             self.model_name_list.append(LamellarPCrystalModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LamellarPCrystalModel.__name__))
 
         try:
@@ -626,6 +631,6 @@
             self.model_name_list.append(SCCrystalModel.__name__)
         except:
-            pass
-
+            logging.error(base_message.format(SCCrystalModel.__name__))
+            
         try:
             from sas.models.FCCrystalModel import FCCrystalModel
@@ -635,5 +640,5 @@
             self.model_name_list.append(FCCrystalModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(FCCrystalModel.__name__))
 
         try:
@@ -644,5 +649,5 @@
             self.model_name_list.append(BCCrystalModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(BCCrystalModel.__name__))
 
 
@@ -655,5 +660,5 @@
             self.model_name_list.append(SquareWellStructure.__name__)
         except:
-            pass
+            logging.error(base_message.format(SquareWellStructure.__name__))
 
         try:
@@ -664,5 +669,5 @@
             self.model_name_list.append(HardsphereStructure.__name__)
         except:
-            pass
+            logging.error(base_message.format(HardsphereStructure.__name__))
 
         try:
@@ -673,5 +678,5 @@
             self.model_name_list.append(StickyHSStructure.__name__)
         except:
-            pass
+            logging.error(base_message.format(StickyHSStructure.__name__))
 
         try:
@@ -682,5 +687,5 @@
             self.model_name_list.append(HayterMSAStructure.__name__)
         except:
-            pass
+            logging.error(base_message.format(HayterMSAStructure.__name__))
 
 
@@ -694,5 +699,5 @@
             self.model_name_list.append(PowerLawAbsModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(PowerLawAbsModel.__name__))
 
         try:
@@ -704,5 +709,5 @@
             self.form_factor_dict[str(wx.NewId())] = [SphereModel]
         except:
-            pass
+            logging.error(base_message.format(BEPolyelectrolyte.__name__))
 
         try:
@@ -713,5 +718,5 @@
             self.model_name_list.append(BroadPeakModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(BroadPeakModel.__name__))
 
         try:
@@ -722,5 +727,5 @@
             self.model_name_list.append(CorrLengthModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(CorrLengthModel.__name__))
 
         try:
@@ -731,5 +736,5 @@
             self.model_name_list.append(DABModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(DABModel.__name__))
 
         try:
@@ -740,5 +745,5 @@
             self.model_name_list.append(DebyeModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(DebyeModel.__name__))
 
         try:
@@ -749,5 +754,5 @@
             self.model_name_list.append(FractalModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(FractalModel.__name__))
 
         try:
@@ -758,5 +763,5 @@
             self.model_name_list.append(FractalCoreShellModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(FractalCoreShellModel.__name__))
 
         try:
@@ -767,5 +772,5 @@
             self.model_name_list.append(GaussLorentzGelModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(GaussLorentzGelModel.__name__))
 
         try:
@@ -776,5 +781,5 @@
             self.model_name_list.append(GuinierModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(GuinierModel.__name__))
 
         try:
@@ -785,5 +790,5 @@
             self.model_name_list.append(GuinierPorodModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(GuinierPorodModel.__name__))
 
         try:
@@ -794,5 +799,5 @@
             self.model_name_list.append(LorentzModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LorentzModel.__name__))
 
         try:
@@ -803,5 +808,5 @@
             self.model_name_list.append(MassFractalModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(MassFractalModel.__name__))
 
         try:
@@ -812,5 +817,5 @@
             self.model_name_list.append(MassSurfaceFractal.__name__)
         except:
-            pass
+            logging.error(base_message.format(MassSurfaceFractal.__name__))
 
         try:
@@ -821,5 +826,5 @@
             self.model_name_list.append(PeakGaussModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(PeakGaussModel.__name__))
 
         try:
@@ -830,5 +835,5 @@
             self.model_name_list.append(PeakLorentzModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(PeakLorentzModel.__name__))
 
         try:
@@ -839,5 +844,5 @@
             self.model_name_list.append(Poly_GaussCoil.__name__)
         except:
-            pass
+            logging.error(base_message.format(Poly_GaussCoil.__name__))
 
         try:
@@ -848,5 +853,5 @@
             self.model_name_list.append(PolymerExclVolume.__name__)
         except:
-            pass
+            logging.error(base_message.format(PolymerExclVolume.__name__))
 
         try:
@@ -857,5 +862,5 @@
             self.model_name_list.append(PorodModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(PorodModel.__name__))
 
         try:
@@ -866,5 +871,5 @@
             self.multi_func_list.append(RPA10Model)
         except:
-            pass
+            logging.error(base_message.format(RPA10Model.__name__))
 
         try:
@@ -875,5 +880,5 @@
             self.model_name_list.append(StarPolymer.__name__)
         except:
-            pass
+            logging.error(base_message.format(StarPolymer.__name__))
 
         try:
@@ -884,5 +889,5 @@
             self.model_name_list.append(SurfaceFractalModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(SurfaceFractalModel.__name__))
 
         try:
@@ -893,5 +898,5 @@
             self.model_name_list.append(TeubnerStreyModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(TeubnerStreyModel.__name__))
 
         try:
@@ -902,5 +907,5 @@
             self.model_name_list.append(TwoLorentzianModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(TwoLorentzianModel.__name__))
 
         try:
@@ -911,5 +916,5 @@
             self.model_name_list.append(TwoPowerLawModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(TwoPowerLawModel.__name__))
 
         try:
@@ -920,5 +925,5 @@
             self.multi_func_list.append(UnifiedPowerRgModel)
         except:
-            pass
+            logging.error(base_message.format(UnifiedPowerRgModel.__name__))
 
         try:
@@ -929,5 +934,5 @@
             self.model_name_list.append(LineModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(LineModel.__name__))
 
         try:
@@ -938,5 +943,5 @@
             self.multi_func_list.append(ReflectivityModel)
         except:
-            pass
+            logging.error(base_message.format(ReflectivityModel.__name__))
 
         try:
@@ -947,5 +952,5 @@
             self.multi_func_list.append(ReflectivityIIModel)
         except:
-            pass
+            logging.error(base_message.format(ReflectivityIIModel.__name__))
 
         try:
@@ -956,5 +961,5 @@
             self.model_name_list.append(GelFitModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(GelFitModel.__name__))
 
         try:
@@ -965,5 +970,5 @@
             self.model_name_list.append(PringlesModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(PringlesModel.__name__))
 
         try:
@@ -975,5 +980,5 @@
             self.model_name_list.append(RectangularPrismModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(RectangularPrismModel.__name__))
 
         try:
@@ -985,5 +990,5 @@
             self.model_name_list.append(RectangularHollowPrismInfThinWallsModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(RectangularHollowPrismInfThinWallsModel.__name__))
 
         try:
@@ -995,5 +1000,5 @@
             self.model_name_list.append(RectangularHollowPrismModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(RectangularHollowPrismModel.__name__))
 
         try:
@@ -1005,5 +1010,5 @@
             self.model_name_list.append(MicelleSphCoreModel.__name__)
         except:
-            pass
+            logging.error(base_message.format(MicelleSphCoreModel.__name__))
 
 
@@ -1063,5 +1068,5 @@
         new_plugins = _findModels(dir)
         for name, plug in  new_plugins.iteritems():
-            for stored_name, stored_plug in self.stored_plugins.iteritems():
+            for stored_name, _ in self.stored_plugins.iteritems():
                 if name == stored_name:
                     del self.stored_plugins[name]
