Index: setup.py
===================================================================
--- setup.py	(revision 36ca21e21e4a495fcd26ca357d897051fd52bdb6)
+++ setup.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -451,7 +451,5 @@
 
 required = [
-    'bumps>=0.7.5.9', 'periodictable>=1.5.0', 'pyparsing<2.0.0',
-
-    # 'lxml>=2.2.2',
+    'bumps>=0.7.5.9', 'periodictable>=1.5.0',
     'lxml', 'h5py',
 
Index: src/sas/qtgui/Calculators/DataOperationUtilityPanel.py
===================================================================
--- src/sas/qtgui/Calculators/DataOperationUtilityPanel.py	(revision 895e7359d4338c6297f2baacf8a64deb50de5590)
+++ src/sas/qtgui/Calculators/DataOperationUtilityPanel.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -273,5 +273,5 @@
                 msg = 'DataOperation: Number requires a float number'
                 logging.warning(msg)
-                self.txtNumber.setStyleSheet(QtCore.QString(BG_RED))
+                self.txtNumber.setStyleSheet(BG_RED)
 
             elif float(self.txtNumber.text()) == 0.:
@@ -279,8 +279,8 @@
                 msg = 'DataOperation: Number requires a non zero number'
                 logging.warning(msg)
-                self.txtNumber.setStyleSheet(QtCore.QString(BG_RED))
+                self.txtNumber.setStyleSheet(BG_RED)
 
             else:
-                self.txtNumber.setStyleSheet(QtCore.QString(BG_WHITE))
+                self.txtNumber.setStyleSheet(BG_WHITE)
                 self.data2 = float(self.txtNumber.text())
                 self.updatePlot(self.graphData2, self.layoutData2, self.data2)
@@ -293,11 +293,11 @@
         else:
             if self.cbData2.currentText() == 'Number':
-                self.cbData1.setStyleSheet(QtCore.QString(BG_WHITE))
-                self.cbData2.setStyleSheet(QtCore.QString(BG_WHITE))
+                self.cbData1.setStyleSheet(BG_WHITE)
+                self.cbData2.setStyleSheet(BG_WHITE)
                 return True
 
             elif self.data1.__class__.__name__ != self.data2.__class__.__name__:
-                self.cbData1.setStyleSheet(QtCore.QString(BG_RED))
-                self.cbData2.setStyleSheet(QtCore.QString(BG_RED))
+                self.cbData1.setStyleSheet(BG_RED)
+                self.cbData2.setStyleSheet(BG_RED)
                 print(self.data1.__class__.__name__ != self.data2.__class__.__name__)
                 logging.warning('Cannot compute data of different dimensions')
@@ -308,6 +308,6 @@
                              not all(i == j for i, j in zip(self.data1.x, self.data2.x))):
                 logging.warning('Cannot compute 1D data of different lengths')
-                self.cbData1.setStyleSheet(QtCore.QString(BG_RED))
-                self.cbData2.setStyleSheet(QtCore.QString(BG_RED))
+                self.cbData1.setStyleSheet(BG_RED)
+                self.cbData2.setStyleSheet(BG_RED)
                 return False
 
@@ -320,12 +320,12 @@
                                 zip(self.data1.qy_data, self.data2.qy_data))
                          ):
-                self.cbData1.setStyleSheet(QtCore.QString(BG_RED))
-                self.cbData2.setStyleSheet(QtCore.QString(BG_RED))
+                self.cbData1.setStyleSheet(BG_RED)
+                self.cbData2.setStyleSheet(BG_RED)
                 logging.warning('Cannot compute 2D data of different lengths')
                 return False
 
             else:
-                self.cbData1.setStyleSheet(QtCore.QString(BG_WHITE))
-                self.cbData2.setStyleSheet(QtCore.QString(BG_WHITE))
+                self.cbData1.setStyleSheet(BG_WHITE)
+                self.cbData2.setStyleSheet(BG_WHITE)
                 return True
 
@@ -333,18 +333,18 @@
         """ Check that name of output does not already exist """
         name_to_check = str(self.txtOutputData.text())
-        self.txtOutputData.setStyleSheet(QtCore.QString(BG_WHITE))
+        self.txtOutputData.setStyleSheet(BG_WHITE)
 
         if name_to_check is None or name_to_check == '':
-            self.txtOutputData.setStyleSheet(QtCore.QString(BG_RED))
+            self.txtOutputData.setStyleSheet(BG_RED)
             logging.warning('No output name')
             return False
 
         elif name_to_check in self.list_data_items:
-            self.txtOutputData.setStyleSheet(QtCore.QString(BG_RED))
+            self.txtOutputData.setStyleSheet(BG_RED)
             logging.warning('The Output data name already exists')
             return False
 
         else:
-            self.txtOutputData.setStyleSheet(QtCore.QString(BG_WHITE))
+            self.txtOutputData.setStyleSheet(BG_WHITE)
             return True
 
Index: src/sas/qtgui/Calculators/GenericScatteringCalculator.py
===================================================================
--- src/sas/qtgui/Calculators/GenericScatteringCalculator.py	(revision b0b09b9740526b0b3838f642e43599409dfd8772)
+++ src/sas/qtgui/Calculators/GenericScatteringCalculator.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -235,22 +235,17 @@
         """Check range of text edits for QMax and Number of Qbins """
         text_edit = self.sender()
-        text_edit.setStyleSheet(
-            QtCore.QString.fromUtf8('background-color: rgb(255, 255, 255);'))
+        text_edit.setStyleSheet('background-color: rgb(255, 255, 255);')
         if text_edit.text():
             value = float(str(text_edit.text()))
             if text_edit == self.txtQxMax:
                 if value <= 0 or value > 1000:
-                    text_edit.setStyleSheet(QtCore.QString.fromUtf8(
-                        'background-color: rgb(255, 182, 193);'))
+                    text_edit.setStyleSheet('background-color: rgb(255, 182, 193);')
                 else:
-                    text_edit.setStyleSheet(QtCore.QString.fromUtf8(
-                        'background-color: rgb(255, 255, 255);'))
+                    text_edit.setStyleSheet('background-color: rgb(255, 255, 255);')
             elif text_edit == self.txtNoQBins:
                 if value < 2 or value > 1000:
-                    self.txtNoQBins.setStyleSheet(QtCore.QString.fromUtf8(
-                        'background-color: rgb(255, 182, 193);'))
+                    self.txtNoQBins.setStyleSheet('background-color: rgb(255, 182, 193);')
                 else:
-                    self.txtNoQBins.setStyleSheet(QtCore.QString.fromUtf8(
-                        'background-color: rgb(255, 255, 255);'))
+                    self.txtNoQBins.setStyleSheet('background-color: rgb(255, 255, 255);')
 
     def update_gui(self):
@@ -555,4 +550,5 @@
             # Add deferred callback for call return
             d.addCallback(self.plot_1_2d)
+            d.addErrback(self.calculateFailed)
         except:
             log_msg = "{}. stop".format(sys.exc_info()[1])
@@ -564,4 +560,10 @@
         Copied from previous version
         """
+        pass
+
+    def calculateFailed(self, reason):
+        """
+        """
+        print("Calculate Failed with:\n", reason)
         pass
 
Index: src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py
===================================================================
--- src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py	(revision b0b09b9740526b0b3838f642e43599409dfd8772)
+++ src/sas/qtgui/Calculators/ResolutionCalculatorPanel.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -111,5 +111,5 @@
         # call compute to calculate with default values
         self.createTemplate2DPlot()
-        self.onCompute()
+        #self.onCompute()
 
     # #################################
@@ -123,14 +123,14 @@
         text_edit = self.txtWavelength  # self.sender()
         if text_edit.isModified():
-            text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+            text_edit.setStyleSheet(BG_WHITE)
             input_string = str(text_edit.text())
             if self.cbWaveColor.currentText() != 'TOF':
                 input_wavelength = re.match('\d+\.?\d*', input_string)
                 if input_wavelength is None:
-                    text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                    text_edit.setStyleSheet(BG_RED)
                     self.cmdCompute.setEnabled(False)
                     logging.info('Wavelength has to be a number.')
                 else:
-                    text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                    text_edit.setStyleSheet(BG_WHITE)
                     self.cmdCompute.setEnabled(True)
             else:
@@ -139,5 +139,5 @@
 
                 if interval_wavelength is None:
-                    text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                    text_edit.setStyleSheet(BG_RED)
                     self.cmdCompute.setEnabled(False)
                     logging.info("Wavelength's input has to be an interval: "
@@ -149,10 +149,10 @@
 
                     if float(wavelength_min) >= float(wavelength_max):
-                        text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                        text_edit.setStyleSheet(BG_RED)
                         self.cmdCompute.setEnabled(False)
                         logging.info("Wavelength: min must be smaller than max.")
 
                     else:
-                        text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                        text_edit.setStyleSheet(BG_WHITE)
                         self.cmdCompute.setEnabled(True)
 
@@ -163,5 +163,5 @@
 
         if text_edit.isModified():
-            text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+            text_edit.setStyleSheet(BG_WHITE)
             if self.cbWaveColor.currentText() != 'TOF':
                 pattern = '^\d+\.?\d*(|;\s*\d+)$'
@@ -170,5 +170,5 @@
 
                 if wavelength_spread_input is None:
-                    text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                    text_edit.setStyleSheet(BG_RED)
                     self.cmdCompute.setEnabled(False)
                     logging.info('Wavelength spread has to be specified: '
@@ -178,5 +178,5 @@
                     split_input = wavelength_spread_input.group().split(';')
                     self.num_wave = split_input[1] if len(split_input) > 1 else 10
-                    text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                    text_edit.setStyleSheet(BG_WHITE)
                     self.cmdCompute.setEnabled(True)
             else:
@@ -186,5 +186,5 @@
 
                 if wavelength_spread_input is None:
-                    text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                    text_edit.setStyleSheet(BG_RED)
                     self.cmdCompute.setEnabled(False)
                     logging.info("Wavelength spread has to be specified: "
@@ -197,5 +197,5 @@
                     self.num_wave = split_input[1] if len(
                         split_input) > 1 else 10
-                    text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                    text_edit.setStyleSheet(BG_WHITE)
                     self.cmdCompute.setEnabled(True)
 
@@ -205,5 +205,5 @@
 
         if text_edit.isModified():
-            text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+            text_edit.setStyleSheet(BG_WHITE)
             pattern = '^\d+\.?\d*,\s*\d+\.?\d*$'
             input_string = str(text_edit.text())
@@ -211,5 +211,5 @@
 
             if pixels_input is None:
-                text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                text_edit.setStyleSheet(BG_RED)
                 self.cmdCompute.setEnabled(False)
                 logging.info('The input for the detector should contain 2 '
@@ -217,5 +217,5 @@
 
             else:
-                text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                text_edit.setStyleSheet(BG_WHITE)
                 self.cmdCompute.setEnabled(True)
 
@@ -229,9 +229,9 @@
             q_input = re.match(pattern, input_string)
             if q_input is None:
-                text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                text_edit.setStyleSheet(BG_RED)
                 self.cmdCompute.setEnabled(False)
                 logging.info('Qx and Qy should contain one or more comma-separated numbers.')
             else:
-                text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                text_edit.setStyleSheet(BG_WHITE)
                 self.cmdCompute.setEnabled(True)
                 qx = str(self.txtQx.text()).split(',')
@@ -247,5 +247,5 @@
 
                 elif len(qx) != len(qy):
-                    text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                    text_edit.setStyleSheet(BG_RED)
                     self.cmdCompute.setEnabled(False)
                     logging.info(
@@ -253,5 +253,5 @@
 
                 else:
-                    text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                    text_edit.setStyleSheet(BG_WHITE)
                     self.cmdCompute.setEnabled(True)
 
@@ -261,5 +261,5 @@
 
         if text_edit.isModified():
-            text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+            text_edit.setStyleSheet(BG_WHITE)
             input_string = str(text_edit.text())
             pattern = '^\d+\.?\d*(|,\s*\d+)$'
@@ -267,5 +267,5 @@
 
             if aperture_input is None:
-                text_edit.setStyleSheet(QtCore.QString(BG_RED))
+                text_edit.setStyleSheet(BG_RED)
                 self.cmdCompute.setEnabled(False)
                 logging.info('A circular aperture is defined by a single '
@@ -274,5 +274,5 @@
 
             else:
-                text_edit.setStyleSheet(QtCore.QString(BG_WHITE))
+                text_edit.setStyleSheet(BG_WHITE)
                 self.cmdCompute.setEnabled(True)
 
@@ -524,4 +524,5 @@
 
             cal_res.addCallback(self.complete)
+            cal_res.addErrback(self.calculateFailed)
 
             # logging.info("Computation is in progress...")
@@ -531,4 +532,8 @@
             raise
 
+    def calculateFailed(self, reason):
+        print("calculateFailed Failed with:\n", reason)
+        pass
+
     def complete(self, image):
         """
@@ -562,4 +567,7 @@
         : return: image (numpy array)
         """
+        # This fails in py3 with
+        # [Failure instance: Traceback: <class 'TypeError'>: 'map' object is not subscriptable
+        # INVESTIGATE
         image = map(func, qx, qy,
                     qx_min, qx_max,
Index: src/sas/qtgui/Calculators/SlitSizeCalculator.py
===================================================================
--- src/sas/qtgui/Calculators/SlitSizeCalculator.py	(revision b0b09b9740526b0b3838f642e43599409dfd8772)
+++ src/sas/qtgui/Calculators/SlitSizeCalculator.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -82,7 +82,4 @@
             return
 
-        if isinstance(path, QtCore.QString):
-            path = str(path)
-
         return path
 
Index: src/sas/qtgui/Calculators/UnitTesting/DataOperationUtilityTest.py
===================================================================
--- src/sas/qtgui/Calculators/UnitTesting/DataOperationUtilityTest.py	(revision 0c468bf6b4ba74af507bdcabc388e3094ca3e790)
+++ src/sas/qtgui/Calculators/UnitTesting/DataOperationUtilityTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -8,6 +8,6 @@
 from PyQt4.QtTest import QTest
 from PyQt4.QtCore import Qt
-from mock import MagicMock
-from mock import patch
+from unittest.mock import MagicMock
+from unittest.mock import patch
 
 from twisted.internet import threads
Index: src/sas/qtgui/Calculators/UnitTesting/DensityCalculatorTest.py
===================================================================
--- src/sas/qtgui/Calculators/UnitTesting/DensityCalculatorTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Calculators/UnitTesting/DensityCalculatorTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4.QtTest import QTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 ####### TEMP
Index: src/sas/qtgui/Calculators/UnitTesting/GenericScatteringCalculatorTest.py
===================================================================
--- src/sas/qtgui/Calculators/UnitTesting/GenericScatteringCalculatorTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Calculators/UnitTesting/GenericScatteringCalculatorTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -7,6 +7,6 @@
 
 from PyQt4.QtCore import Qt
-from mock import MagicMock
-from mock import patch
+from unittest.mock import MagicMock
+from unittest.mock import patch
 
 # set up import paths
Index: src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py
===================================================================
--- src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py	(revision 170e95d7e328a0390445b138c413c72b4aa20f2d)
+++ src/sas/qtgui/Calculators/UnitTesting/ResolutionCalculatorPanelTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -8,6 +8,5 @@
 from PyQt4.QtTest import QTest
 from PyQt4.QtCore import Qt
-from mock import MagicMock
-from mock import patch
+from unittest.mock import MagicMock
 
 from twisted.internet import threads
Index: src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py
===================================================================
--- src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Calculators/UnitTesting/SLDCalculatorTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4.QtTest import QTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 ####### TEMP
Index: src/sas/qtgui/Calculators/UnitTesting/SlitSizeCalculatorTest.py
===================================================================
--- src/sas/qtgui/Calculators/UnitTesting/SlitSizeCalculatorTest.py	(revision b0b09b9740526b0b3838f642e43599409dfd8772)
+++ src/sas/qtgui/Calculators/UnitTesting/SlitSizeCalculatorTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -4,5 +4,5 @@
 from PyQt4.QtTest import QTest
 from PyQt4.QtCore import Qt
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/MainWindow/DataExplorer.py
===================================================================
--- src/sas/qtgui/MainWindow/DataExplorer.py	(revision b0b09b9740526b0b3838f642e43599409dfd8772)
+++ src/sas/qtgui/MainWindow/DataExplorer.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -175,4 +175,5 @@
         load_thread = threads.deferToThread(self.readData, url)
         load_thread.addCallback(self.loadComplete)
+        load_thread.addErrback(self.loadFailed)
 
     def loadFile(self, event=None):
@@ -221,4 +222,11 @@
             load_thread = threads.deferToThread(self.readProject, filename)
             load_thread.addCallback(self.readProjectComplete)
+            load_thread.addErrback(self.readProjectFailed)
+
+    def readProjectFailed(self, reason):
+        """
+        """
+        print("readProjectFailed FAILED: ", reason)
+        pass
 
     def readProject(self, filename):
@@ -614,7 +622,4 @@
             return
 
-        #if isinstance(paths, QtCore.QStringList):
-        #    paths = [str(f) for f in paths]
-
         if not isinstance(paths, list):
             paths = [paths]
@@ -992,4 +997,8 @@
         self.manager.add_data(data_list=output_data)
 
+    def loadErrback(self, reason):
+        print("File Load Failed with:\n", reason)
+        pass
+
     def updateModel(self, data, p_file):
         """
Index: src/sas/qtgui/MainWindow/UnitTesting/AboutBoxTest.py
===================================================================
--- src/sas/qtgui/MainWindow/UnitTesting/AboutBoxTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/MainWindow/UnitTesting/AboutBoxTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4.QtTest import QTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/MainWindow/UnitTesting/DataExplorerTest.py
===================================================================
--- src/sas/qtgui/MainWindow/UnitTesting/DataExplorerTest.py	(revision 88e1f57e340b062a07d1e5693c8b7b8a4edc4b32)
+++ src/sas/qtgui/MainWindow/UnitTesting/DataExplorerTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -5,6 +5,6 @@
 from PyQt4.QtTest import QTest
 from PyQt4.QtCore import *
-from mock import MagicMock
-from mock import patch
+from unittest.mock import MagicMock
+from unittest.mock import patch
 from mpl_toolkits.mplot3d import Axes3D
 
@@ -157,5 +157,5 @@
 
         expected_list = [0, 0, 33, 66, -1]
-        spied_list = [spy_progress_bar_update.called()[i]['args'][0] for i in xrange(5)]
+        spied_list = [spy_progress_bar_update.called()[i]['args'][0] for i in range(5)]
         self.assertEqual(expected_list, spied_list)
         
@@ -173,7 +173,4 @@
         filename = ["cyl_400_20.txt", "cyl_400_20.txt", "P123_D2O_10_percent.dat"]
         self.form.readData(filename)
-
-        self.form.show()
-        app.exec_()
 
         # Assure the model contains three items
@@ -329,4 +326,7 @@
         self.form.cbSelect.setCurrentIndex(1)
 
+        self.form.show()
+        app.exec_()
+
         # Test the current selection
         item1D = self.form.model.item(0)
@@ -507,5 +507,5 @@
         # We don't know the data ID, so need to iterate over dict
         data_dict = spy_data_received.called()[0]['args'][0]
-        for data_key, data_value in data_dict.iteritems():
+        for data_key, data_value in data_dict.items():
             self.assertIsInstance(data_value, Data1D)
 
Index: src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py
===================================================================
--- src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py	(revision 8222f171ca8747f44ec53b2088e4cf8903026e84)
+++ src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -9,5 +9,5 @@
 from PyQt4.QtCore import *
 from PyQt4.QtWebKit import *
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
@@ -74,5 +74,5 @@
         # We are in the MainWindow scope, so simple 'print' will work
         message = "from stdout"
-        print message
+        print(message)
         self.assertIn(message, self.manager.logDockWidget.widget().toPlainText())
 
@@ -162,5 +162,5 @@
         """
         # 1. version = 0.0.0
-        version_info = {u'version' : u'0.0.0'}
+        version_info = {'version' : '0.0.0'}
         spy_status_update = QtSignalSpy(self.manager, self.manager.communicate.statusBarUpdateSignal)
 
@@ -172,5 +172,5 @@
 
         # 2. version < LocalConfig.__version__
-        version_info = {u'version' : u'0.0.1'}
+        version_info = {'version' : '0.0.1'}
         spy_status_update = QtSignalSpy(self.manager, self.manager.communicate.statusBarUpdateSignal)
 
@@ -182,5 +182,5 @@
 
         # 3. version > LocalConfig.__version__
-        version_info = {u'version' : u'999.0.0'}
+        version_info = {'version' : '999.0.0'}
         spy_status_update = QtSignalSpy(self.manager, self.manager.communicate.statusBarUpdateSignal)
         webbrowser.open = MagicMock()
Index: src/sas/qtgui/MainWindow/UnitTesting/MainWindowTest.py
===================================================================
--- src/sas/qtgui/MainWindow/UnitTesting/MainWindowTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/MainWindow/UnitTesting/MainWindowTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -5,5 +5,5 @@
 from PyQt4 import QtTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/FittingWidget.py	(revision 895e7359d4338c6297f2baacf8a64deb50de5590)
+++ src/sas/qtgui/Perspectives/Fitting/FittingWidget.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -566,5 +566,5 @@
         model_row = item.row()
         name_index = self._poly_model.index(model_row, 0)
-        parameter_name = str(name_index.data().toString()).lower() # "distribution of sld" etc.
+        parameter_name = str(name_index.data()).lower() # "distribution of sld" etc.
         if "distribution of" in parameter_name:
             # just the last word
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -3,5 +3,5 @@
 
 import numpy
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4 import QtWebKit
 
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4 import QtTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
===================================================================
--- src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py	(revision c7358b24e5032be5648d823d4c423fe8a39ef5b0)
+++ src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,5 +6,5 @@
 from PyQt4 import QtTest
 from PyQt4 import QtCore
-from mock import MagicMock
+from unittest.mock import MagicMock
 from twisted.internet import threads
 
@@ -60,5 +60,5 @@
 
         #Test loading from json categories
-        category_list = fittingWindow.master_category_dict.keys()
+        category_list = list(fittingWindow.master_category_dict.keys())
 
         for category in category_list:
@@ -93,12 +93,12 @@
         fittingWindow.SASModelToQModel("cylinder")
         pd_index = fittingWindow.lstPoly.model().index(0,0)
-        self.assertEqual(str(pd_index.data().toString()), "Distribution of radius")
+        self.assertEqual(str(pd_index.data()), "Distribution of radius")
         pd_index = fittingWindow.lstPoly.model().index(1,0)
-        self.assertEqual(str(pd_index.data().toString()), "Distribution of length")
+        self.assertEqual(str(pd_index.data()), "Distribution of length")
 
         # test the delegate a bit
         delegate = fittingWindow.lstPoly.itemDelegate()
         self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 5)
-        self.assertEqual(delegate.editableParameters(), [2, 3, 4, 5])
+        self.assertEqual(delegate.editableParameters(), [1, 2, 3, 4, 5])
         self.assertEqual(delegate.poly_function, 6)
         self.assertIsInstance(delegate.combo_updated, QtCore.pyqtBoundSignal)
@@ -361,5 +361,5 @@
 
         # Test presence of comboboxes in last column
-        for row in xrange(self.widget._poly_model.rowCount()):
+        for row in range(self.widget._poly_model.rowCount()):
             func_index = self.widget._poly_model.index(row, 6)
             self.assertTrue(isinstance(self.widget.lstPoly.indexWidget(func_index), QtGui.QComboBox))
@@ -509,5 +509,5 @@
 
         # Test rows
-        for row in xrange(self.widget._magnet_model.rowCount()):
+        for row in range(self.widget._magnet_model.rowCount()):
             func_index = self.widget._magnet_model.index(row, 0)
             self.assertIn(':', self.widget._magnet_model.item(row, 0).text())
@@ -889,5 +889,5 @@
 
         # check that range of variation for this parameter has NOT been changed
-        print self.widget.kernel_module.details[name_modified_param]
+        print(self.widget.kernel_module.details[name_modified_param])
         self.assertNotIn(new_value, self.widget.kernel_module.details[name_modified_param] )
 
Index: src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
===================================================================
--- src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py	(revision 895e7359d4338c6297f2baacf8a64deb50de5590)
+++ src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -180,4 +180,5 @@
             # Add deferred callback for call return
             d.addCallback(self.plotResult)
+            d.addErrback(self.plotFailed)
         except Exception as ex:
             # Set the button back to available
@@ -186,4 +187,9 @@
             self.pushButton.setStyleSheet(self.style)
 
+    def plotFailed(self, reason):
+        """
+        """
+        print("plotFailed FAILED: ", reason)
+        pass
 
     def plotResult(self, model):
Index: src/sas/qtgui/Plotting/UnitTesting/AddTextTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/AddTextTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Plotting/UnitTesting/AddTextTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -1,5 +1,5 @@
 import sys
 import unittest
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 from PyQt4 import QtGui
Index: src/sas/qtgui/Plotting/UnitTesting/BoxSumTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/BoxSumTest.py	(revision 895e7359d4338c6297f2baacf8a64deb50de5590)
+++ src/sas/qtgui/Plotting/UnitTesting/BoxSumTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -1,5 +1,5 @@
 import sys
 import unittest
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 from PyQt4 import QtGui
Index: src/sas/qtgui/Plotting/UnitTesting/ColorMapTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/ColorMapTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Plotting/UnitTesting/ColorMapTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -4,5 +4,5 @@
 
 from PyQt4 import QtGui
-from mock import MagicMock
+from unittest.mock import MagicMock
 import matplotlib as mpl
 
Index: src/sas/qtgui/Plotting/UnitTesting/LinearFitTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/LinearFitTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Plotting/UnitTesting/LinearFitTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -4,5 +4,5 @@
 
 from PyQt4 import QtGui
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
@@ -59,5 +59,5 @@
         return_values = self.widget.parent.emit.call_args[0][1]
         # Compare
-        self.assertItemsEqual(return_values[0], [1.0, 3.0])
+        self.assertCountEqual(return_values[0], [1.0, 3.0])
         self.assertAlmostEqual(return_values[1][0], 10.004054329, 6)
         self.assertAlmostEqual(return_values[1][1], 12.030439848, 6)
@@ -68,5 +68,5 @@
         return_values = self.widget.parent.emit.call_args[0][1]
         # Compare
-        self.assertItemsEqual(return_values[0], [1.0, 3.0])
+        self.assertCountEqual(return_values[0], [1.0, 3.0])
         self.assertAlmostEqual(return_values[1][0], 9.987732937, 6)
         self.assertAlmostEqual(return_values[1][1], 11.84365082, 6)
@@ -81,5 +81,5 @@
         x, y, dy = self.widget.origData()
 
-        self.assertItemsEqual(x, orig_x)
+        self.assertCountEqual(x, orig_x)
         self.assertEqual(y[0], orig_y[0])
         self.assertAlmostEqual(y[1], orig_y[1], 8)
@@ -98,7 +98,7 @@
         x, y, dy = self.widget.origData()
 
-        self.assertItemsEqual(x, orig_x)
-        self.assertItemsEqual(y, orig_y)
-        self.assertItemsEqual(dy, orig_dy)
+        self.assertCountEqual(x, orig_x)
+        self.assertCountEqual(y, orig_y)
+        self.assertCountEqual(dy, orig_dy)
 
         # x, log(y)
@@ -111,5 +111,5 @@
         x, y, dy = self.widget.origData()
 
-        self.assertItemsEqual(x, orig_x)
+        self.assertCountEqual(x, orig_x)
         self.assertEqual(y[0], orig_y[0])
         self.assertAlmostEqual(y[1], orig_y[1], 8)
Index: src/sas/qtgui/Plotting/UnitTesting/PlotPropertiesTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/PlotPropertiesTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Plotting/UnitTesting/PlotPropertiesTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -1,5 +1,5 @@
 import sys
 import unittest
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 from PyQt4 import QtGui
Index: src/sas/qtgui/Plotting/UnitTesting/Plotter2DTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/Plotter2DTest.py	(revision b2a5042a962948503c534876c6215195a324cdc9)
+++ src/sas/qtgui/Plotting/UnitTesting/Plotter2DTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -7,5 +7,5 @@
 from PyQt4 import QtCore
 from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
-from mock import MagicMock
+from unittest.mock import MagicMock
 from mpl_toolkits.mplot3d import Axes3D
 
Index: src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py	(revision b2a5042a962948503c534876c6215195a324cdc9)
+++ src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -2,5 +2,5 @@
 import unittest
 import platform
-from mock import patch, MagicMock
+from unittest.mock import MagicMock
 
 from PyQt4 import QtGui
Index: src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py	(revision b2a5042a962948503c534876c6215195a324cdc9)
+++ src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -6,6 +6,6 @@
 from PyQt4 import QtCore
 from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
-from mock import MagicMock
-from mock import patch
+from unittest.mock import MagicMock
+from unittest.mock import patch
 
 ####### TEMP
@@ -236,5 +236,5 @@
 
         # Just this one plot
-        self.assertEqual(len(self.plotter.plot_dict.keys()), 1)
+        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 1)
         self.plotter.onLinearFit(1)
 
@@ -260,10 +260,10 @@
 
         # Assure we have two sets
-        self.assertEqual(len(self.plotter.plot_dict.keys()), 2)
+        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 2)
 
         # Delete one set
         self.plotter.onRemovePlot(2)
         # Assure we have two sets
-        self.assertEqual(len(self.plotter.plot_dict.keys()), 1)
+        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 1)
 
         self.plotter.manager = MagicMock()
@@ -272,5 +272,5 @@
         self.plotter.onRemovePlot(1)
         # Assure we have no plots
-        self.assertEqual(len(self.plotter.plot_dict.keys()), 0)
+        self.assertEqual(len(list(self.plotter.plot_dict.keys())), 0)
         # Assure the plotter window is closed
         self.assertFalse(self.plotter.isVisible())
Index: src/sas/qtgui/Plotting/UnitTesting/SlicerModelTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/SlicerModelTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Plotting/UnitTesting/SlicerModelTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -1,5 +1,5 @@
 import sys
 import unittest
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 from PyQt4 import QtGui
Index: src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py
===================================================================
--- src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/Plotting/UnitTesting/SlicerParametersTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -1,5 +1,5 @@
 import sys
 import unittest
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 from PyQt4 import QtGui
@@ -7,6 +7,4 @@
 from PyQt4 import QtTest
 from PyQt4 import QtWebKit
-
-from mock import MagicMock
 
 # set up import paths
Index: src/sas/qtgui/UnitTesting/TestUtils.py
===================================================================
--- src/sas/qtgui/UnitTesting/TestUtils.py	(revision 895e7359d4338c6297f2baacf8a64deb50de5590)
+++ src/sas/qtgui/UnitTesting/TestUtils.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -10,9 +10,9 @@
     """
     if method_name is not None:
-        print("\nWARNING: %s needs implementing!"%method_name)
+        print(("\nWARNING: %s needs implementing!"%method_name))
     else:
         (frame, filename, line_number,
             function_name, lines, index) = inspect.getouterframes(inspect.currentframe())[1]
-        print("\nWARNING: %s needs implementing!"%function_name)
+        print(("\nWARNING: %s needs implementing!"%function_name))
 
 class QtSignalSpy(QObject):
@@ -39,5 +39,5 @@
         except AttributeError:
             msg = "Wrong construction of QtSignalSpy instance"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
     def slot(self, *args, **kwargs):
Index: src/sas/qtgui/UnitTesting/TestUtilsTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/TestUtilsTest.py	(revision 464cd0702ca4f47ed61d237d9acecd5975d8abac)
+++ src/sas/qtgui/UnitTesting/TestUtilsTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -5,5 +5,5 @@
 from PyQt4.QtTest import QTest
 from PyQt4.QtCore import *
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # Local
Index: src/sas/qtgui/Utilities/UnitTesting/GuiUtilsTest.py
===================================================================
--- src/sas/qtgui/Utilities/UnitTesting/GuiUtilsTest.py	(revision 895e7359d4338c6297f2baacf8a64deb50de5590)
+++ src/sas/qtgui/Utilities/UnitTesting/GuiUtilsTest.py	(revision 99ea1b0a8c79c7cca1feb2e3bcae293656ef8ca8)
@@ -5,5 +5,5 @@
 from PyQt4 import QtCore
 from PyQt4 import QtGui
-from mock import MagicMock
+from unittest.mock import MagicMock
 
 # set up import paths
