-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Describe the bug
While the Two Yukawa structure factor has been merged into the master branch of sasmodels, it still does not show up in the structure factor drop down at least in the windows installer. Moreover, when saving a plugin model it causes an error to be thrown (copied from the log explorer window below)
10:45:56 - ERROR: Traceback (most recent call last): File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\generate.py", line 1178, in load_kernel_module __import__('sasmodels.models.'+model_name) File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\models\two_yukawa.py", line 97, in from sasmodels.TwoYukawa.CalTYSk import K_MIN, Z_MIN, Z_MIN_DIFF, CalTYSk ModuleNotFoundError: No module named 'sasmodels.TwoYukawa' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\sasview_model.py", line 112, in load_standard_models MODELS[name] = _make_standard_model(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\sasview_model.py", line 198, in _make_standard_model kernel_module = generate.load_kernel_module(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\generate.py", line 1186, in load_kernel_module kernel_module = load_custom_kernel_module(model_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\custom\__init__.py", line 60, in load_custom_kernel_module if need_reload(path): ^^^^^^^^^^^^^^^^^ File "c:\SasView-6.1.2Nightly29OCT25\sasmodels\custom\__init__.py", line 115, in need_reload return any(cache_time return any(cache_time
10:45:56 - INFO: C:\Users\Paul\AppData\Local\sasview\SasView\plugin_models\newsin.py successfully saved.To Reproduce
Steps to reproduce the behavior:
- Go to FitPage1
- Load a model that can use a structure factor
- Click Structure Factor drop down
- There is no Two Yukawa
- Go to
Fitting-->Edit Custom Model - Load a plugin model
- Click on
saveto force the model to be saved. Apparently there is no checking to see if any changes were actually made and will try to save anyway - Log Explorer window pops up with above error
- See error
Expected behavior
for main the 2 Yukawa should show up in the structure factor drop down and should not cause and error to be thrown. I would argue that for 6.1.x bug fix releases the Two Yukawa should not be included at all.
SasView version (please complete the following information):
- Version: downloaded windows installer from github nightly release build of Oct 29, 2025 at: https://github.com/SasView/sasview/releases/tag/nightly-build
Operating system (please complete the following information):
- OS: Windows 10
Installation method (please complete the following information):
- Installed: see above