Ignore:
Timestamp:
Aug 9, 2018 12:10:33 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
0863065
Parents:
fa374b0
Message:

remove cached model before attempting reload. Refs #1142

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/pyconsole.py

    rfa374b0 re2663b7  
    5757    result = run_one(path) 
    5858 
     59    # remove cached version of the model, if any 
     60    from sasmodels import sasview_model 
     61    sasview_model.MODEL_BY_PATH.pop(path, None) 
     62 
    5963    # try running the model 
    60     from sasmodels.sasview_model import load_custom_model 
    61     Model = load_custom_model(path) 
     64    Model = sasview_model.load_custom_model(path) 
    6265    model = Model() 
    6366    q =  np.array([0.01, 0.1]) 
Note: See TracChangeset for help on using the changeset viewer.