Skip to content

Two Yukawa is causing issues in the windows installer #3664

@butlerpd

Description

@butlerpd

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:

  1. Go to FitPage1
  2. Load a model that can use a structure factor
  3. Click Structure Factor drop down
  4. There is no Two Yukawa
  5. Go to Fitting --> Edit Custom Model
  6. Load a plugin model
  7. Click on save to 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
  8. Log Explorer window pops up with above error
  9. 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):

Operating system (please complete the following information):

  • OS: Windows 10

Installation method (please complete the following information):

  • Installed: see above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions