Changes between Initial Version and Version 5 of Ticket #583
- Timestamp:
- Jul 2, 2016 5:28:35 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #583
- Property Owner set to ajj
- Property Status changed from new to closed
- Property Resolution changed from to fixed
- Property Priority changed from critical to blocker
-
Ticket #583 – Description
initial v5 3 3 When trying to create a model as the sum of two standard models, the following error message appears: 4 4 5 “Running model ' MySumFunction.py'...5 “Running model '!MySumFunction.py'... 6 6 Error occurred: 7 7 Traceback (most recent call last): 8 8 File "sas\sasgui\perspectives\calculator\pyconsole.pyc", line 55, in show_model_output 9 9 File "sas\sasgui\perspectives\calculator\pyconsole.pyc", line 30, in check_model 10 ImportError: cannot import name make_class”10 !ImportError: cannot import name make_class” 11 11 12 12 This happens because the function make_class (in sasmodels/sasview_model.py) does not exist anymore, as it was replaced by _make_standard_model in 4d76711 on Apr 5 (Paul Kienzle adjust interface to sasview). Note: The comment at the beginning of sasview_model.py should be changed accordingly, as it still mentions make_class. … … 16 16 This is what I could follow about the program execution: 17 17 18 - I start SasView 4.0 having the file MG_sum1.py in the .sasview\plugin_models folder. This is just the file created by the template of “Sum|Multi(p1,p2)” for a model consisting of an sphere + a cylinder, but replacing make_class by _make_standard_model.18 - I start !SasView 4.0 having the file MG_sum1.py in the .sasview\plugin_models folder. This is just the file created by the template of “Sum|Multi(p1,p2)” for a model consisting of an sphere + a cylinder, but replacing make_class by _make_standard_model. 19 19 20 20 - In sasview\src\sas\sasgui\perspectives\fitting\models.py it is added to the plugins by the command plugins[name] = module.Model, returning a class MG_sum1.model. As a reference, a simple python model present in the plugin_models is loaded using plugins[name] = load_custom_model(filename) and we generate a class sasmodels.sasview_model.MG_simple1