Skip to content

Leftover crumbs when renaming a model #3993

Open

Description

@butlerpd

Describe the bug
I think this goes in the sasview repo but it might be a sasmodel issue. In testing the alpha3's new polyhedron models I noticed that the polyhedron category contains TWO versions of the truncated octahedron model: octahedron_truncated and truncated_octathedron. Only the second one works. The firsrt looks like a relic of a first version before it was renamed to meet sasview naming convention? It seems somehow still in the list somewhere but the code no longer is. It returns a Key Error:

17:10:25 - ERROR: Traceback (most recent call last): File "sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 1195, in onSelectModel File "sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 1368, in respondToModelStructure File "sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 1985, in SASModelToQModel File "sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 2032, in fromModelToQModel KeyError: 'octahedron_truncated'

SasView version (please complete the following information):

  • Version: 6.2.0a3

Operating system (please complete the following information):

  • OS: Windows 11

Installation method (please complete the following information):

  • Installed: from github release page artifact. Ran that installer locally to install on my machine

Activity

  1. added theissue type on Jun 4, 2026
  2. krzywon commented on Jun 5, 2026

    @krzywon
    Contributor

    The bug and the title are two different things and I think we should track this, but your title isn't what is really wrong here. The issue is your category.json file is now polluted with a model you no longer have in your installation, but SasView does not have a mechanism to handle this. Currently, plugin models are suppressed if they don't exist or can't be loaded, but with an error. We should do something similar for built-in models as well.

  3. krzywon commented on Jun 5, 2026

    @krzywon
    Contributor

    Suggested title: Check that all models exist on startup

  4. butlerpd commented on Jun 5, 2026

    @butlerpd
    MemberAuthor

    So your suggesting this only happens on machines which ran/tested installer that once DID have models with those names packaged? So if a package has models that don't exist in the json file they get added, but if some exits in the json file that don't exist in the installer they do not get removed? If so then your title makes some sense. I can try later on a different machine to make sure that is the case.

  5. krzywon commented on Jun 5, 2026

    @krzywon
    Contributor

    Correct. Alternately, delete your categories.json file and see what happens. Notes on how to do this - #3961 (comment)

  6. changed the title [-]Leftover crumbs from renaming of the truncated octahedron model[/-] [+]Leftover crumbs when renaming a model[/+] on Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions