Changes between Initial Version and Version 5 of Ticket #583


Ignore:
Timestamp:
Jul 2, 2016 3:28:35 PM (8 years ago)
Author:
butler
Comment:

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  
    33When trying to create a model as the sum of two standard models, the following error message appears: 
    44 
    5 “Running model 'MySumFunction.py'...  
     5“Running model '!MySumFunction.py'...  
    66Error occurred: 
    77Traceback (most recent call last): 
    88  File "sas\sasgui\perspectives\calculator\pyconsole.pyc", line 55, in show_model_output 
    99  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” 
    1111 
    1212This 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. 
     
    1616This is what I could follow about the program execution: 
    1717 
    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. 
    1919 
    2020- 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