id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,workpackage 865,Plugin live discovery issues,butler,awashington,"The on the fly discovery of plugins has quite a few issue and needs to be looked at carefully. Some findings so far: 1. Creating a new model with the new model editor usually shows up as: [plugin]name_user indicating there is a duplicate of that name in the namespace. Interestingly exiting and reloading !SasView and the name is now just [plugin]name. 2. Further if the active model is a plugin the model drop down is cleared (but not the GUI). However now, even if the model is reselected, or if the new model is selected (or any other plugin) an error is thrown on the console: {{{ 2017-02-27 00:12:09 : Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) TypeError: 'NoneType' object is not callable 2017-02-27 00:12:22 : Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) TypeError: 'NoneType' object is not callable }}} This is all cleared by simply clicking on ""Load Plugin Models"" and all works fine again. 3. Deleting a model, even if the current active category on the fit page is something else (e.g. cylinder), when choosing plugins and then a model from plugins (the deleted model does not show up) the following error is thrown on the command line console: {{{ Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sasgui\perspectives\fitting\fitpage.py"", line 1347, in _onparamEnter self.save_current_state() File ""C:\Users\Paul\git\sasview_new\src\sas\sasgui\perspectives\fitting\basepage.py"", line 805, in save_current_state self.state.model = self.model.clone() File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 506, in clone return deepcopy(self) File ""C:\Users\Paul\workspace\SasView\Python27\lib\copy.py"", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File ""C:\Users\Paul\workspace\SasView\Python27\lib\copy.py"", line 334, in _reconstruct state = deepcopy(state, memo) File ""C:\Users\Paul\workspace\SasView\Python27\lib\copy.py"", line 163, in deepcopy y = copier(x, memo) File ""C:\Users\Paul\workspace\SasView\Python27\lib\copy.py"", line 256, in _deepcopy_dict for key, value in x.iteritems(): RuntimeError: dictionary changed size during iteration }}} while the following error is given to the user in a popup: {{{ 2017-02-27 00:02:13 : Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) TypeError: 'NoneType' object is not callable 2017-02-27 00:02:14 : Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) TypeError: 'NoneType' object is not callable }}} and the log file {{{ 2017-02-27 00:02:13,983 ERROR Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) File ""C:\Users\Paul\git\sasview_new\src\sas\sasgui\perspectives\fitting\model_thread.py"", line 197, in compute output[index] = self.model.evalDistribution(self.data.x[index]) File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 582, in evalDistribution return self.calculate_Iq(qdist) File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 617, in calculate_Iq return self._calculate_Iq(qx, qy) File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 638, in _calculate_Iq magnetic=is_magnetic) File ""C:\Users\Paul\git\sasmodels\sasmodels\kernelpy.py"", line 165, in __call__ self.q_input.nq, call_details, values, cutoff) File ""C:\Users\Paul\git\sasmodels\sasmodels\kernelpy.py"", line 193, in _loops return scale*form() + background File ""C:\Users\Paul\git\sasmodels\sasmodels\kernelpy.py"", line 151, in self._form = lambda: form(q, *kernel_args) File ""C:\Users\Paul\.sasview\plugin_models\broad_peak_test.py"", line 90, in Iq with errstate(divide='ignore'): TypeError: 'NoneType' object is not callable 2017-02-27 00:02:13,996 ERROR 2017-02-27 00:02:13 : Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) TypeError: 'NoneType' object is not callable 2017-02-27 00:02:13,997 ERROR Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) File ""C:\Users\Paul\git\sasview_new\src\sas\sasgui\perspectives\fitting\model_thread.py"", line 197, in compute output[index] = self.model.evalDistribution(self.data.x[index]) File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 582, in evalDistribution return self.calculate_Iq(qdist) File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 617, in calculate_Iq return self._calculate_Iq(qx, qy) File ""C:\Users\Paul\git\sasmodels\sasmodels\sasview_model.py"", line 638, in _calculate_Iq magnetic=is_magnetic) File ""C:\Users\Paul\git\sasmodels\sasmodels\kernelpy.py"", line 165, in __call__ self.q_input.nq, call_details, values, cutoff) File ""C:\Users\Paul\git\sasmodels\sasmodels\kernelpy.py"", line 193, in _loops return scale*form() + background File ""C:\Users\Paul\git\sasmodels\sasmodels\kernelpy.py"", line 151, in self._form = lambda: form(q, *kernel_args) File ""C:\Users\Paul\.sasview\plugin_models\broad_peak_test.py"", line 90, in Iq with errstate(divide='ignore'): TypeError: 'NoneType' object is not callable 2017-02-27 00:02:14,088 ERROR 2017-02-27 00:02:14 : Traceback (most recent call last): File ""C:\Users\Paul\git\sasview_new\src\sas\sascalc\data_util\calcthread.py"", line 268, in _run self.compute(*args, **kwargs) TypeError: 'NoneType' object is not callable }}} Again, simply clicking on ""Load Plugin Models"" seems to clean everything up and it now works again. There are many permutations, particularly since there seems to be 4 slightly different style of models which can behave differently and combinations category and model in dropdown and which and when load, delete, create new, and edit a model are performed. It may be that a lot of it is due to the dictionary of plugins not being updated by the on the fly discovery which is why the ""load Plugin models"" fixes things? or is there something about deep copies holding things around for too long? ",defect,closed,major,SasView 4.2.0,SasView,fixed,,,SasView Bug Fixing