Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blank fit page when selecting old style plugin after reload (Trac #781) #889

Closed
pkienzle opened this issue Mar 30, 2019 · 6 comments
Closed
Assignees
Labels
Defect Bug or undesirable behaviour Minor Small job
Milestone

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

The following error occurs when loading an old style model after the "Load Plugin Models" operation (either from the menu, or from editing and saving a model):

Traceback (most recent call last):
  File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/fitpage.py", line 1179, in _on_select_model
    self._on_select_model_helper()
  File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/basepage.py", line 2045, in _on_select_model_helper
    self.model = form_factor()
  File "/Users/pkienzle/.sasview/plugin_models/polynomial5.py", line 39, in __init__
    Model1DPlugin.__init__(self, name=self.name) ##DO NOT CHANGE THIS LINE!!!
TypeError: expected string or buffer

This gives a blank !FitPage.

The workaround is to request a new fit page, which then makes the old page accessible.

Migrated from http://trac.sasview.org/ticket/781

{
    "status": "closed",
    "changetime": "2017-02-26T16:11:14",
    "_ts": "2017-02-26 16:11:14.793757+00:00",
    "description": "The following error occurs when loading an old style model after the \"Load Plugin Models\" operation (either from the menu, or from editing and saving a model):\n{{{\nTraceback (most recent call last):\n  File \"/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/fitpage.py\", line 1179, in _on_select_model\n    self._on_select_model_helper()\n  File \"/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/basepage.py\", line 2045, in _on_select_model_helper\n    self.model = form_factor()\n  File \"/Users/pkienzle/.sasview/plugin_models/polynomial5.py\", line 39, in __init__\n    Model1DPlugin.__init__(self, name=self.name) ##DO NOT CHANGE THIS LINE!!!\nTypeError: expected string or buffer\n}}}\n\nThis gives a blank !FitPage.\n\nThe workaround is to request a new fit page, which then makes the old page accessible.",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "duplicate",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-10-13T05:52:50",
    "component": "SasView",
    "summary": "blank fit page when selecting old style plugin after reload",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "butler",
    "type": "defect"
}
@butlerpd
Copy link
Member

Trac update at 2016/11/08 14:47:36:

  • butler changed owner from "" to "butler"
  • butler changed status from "new" to "assigned"

@butlerpd
Copy link
Member

Trac update at 2016/11/13 23:17:09: butler changed description from:

The following error occurs when loading an old style model after the "Load Plugin Models" operation (either from the menu, or from editing and saving a model):
{{{
Traceback (most recent call last):
File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/fitpage.py", line 1179, in _on_select_model
self._on_select_model_helper()
File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/basepage.py", line 2045, in _on_select_model_helper
self.model = form_factor()
File "/Users/pkienzle/.sasview/plugin_models/polynomial5.py", line 39, in init
Model1DPlugin.init(self, name=self.name) ##DO NOT CHANGE THIS LINE!!!
TypeError: expected string or buffer
}}}

This gives a blank FitPage.

The workaround is to request a new fit page, which then makes the old page accessible.

to:

The following error occurs when loading an old style model after the "Load Plugin Models" operation (either from the menu, or from editing and saving a model):
{{{
Traceback (most recent call last):
File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/fitpage.py", line 1179, in _on_select_model
self._on_select_model_helper()
File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/basepage.py", line 2045, in _on_select_model_helper
self.model = form_factor()
File "/Users/pkienzle/.sasview/plugin_models/polynomial5.py", line 39, in init
Model1DPlugin.init(self, name=self.name) ##DO NOT CHANGE THIS LINE!!!
TypeError: expected string or buffer
}}}

This gives a blank !FitPage.

The workaround is to request a new fit page, which then makes the old page accessible.

@butlerpd
Copy link
Member

Trac update at 2017/02/20 04:15:52: butler commented:

I am unable to reproduce. Am using ticket-756 branch at commit 11b094f and sasmodels master at commit
9ed53e739d23bb72709ce13077bfdd3c8c34e58a
under windows 10 with OPEN CL available.

Also downloaded latest ESS build for windows (#772 build on Feb 14, 2017 from !SasView master at commit 2510b9b and the same sasmodels commit as above) on old windows 10 machine without OpenCL and all worked fine ... though of course the very old style which imported from sans.xxxx still don't work till the line(s) are replaced with sas.xxxx but that has been true for a long time.

Will verify with reporter before closing ticket.

@pkienzle
Copy link
Contributor Author

Trac update at 2017/02/20 19:30:10: pkienzle commented:

Still fails on master, but doesn't fail on ticket-756 branch. Close after ticket-756 is merged.

@butlerpd
Copy link
Member

Trac update at 2017/02/26 16:07:45:

  • butler changed _comment0 from:

Correction to my previous comment. Branch ticket-756 works while the ESS build fails but in a different way for me than reported: the page freezes. It looks fine until one tries to click on the page or change a parameter. This is no doubt just a different manifestation of the same problem on different machines:

Indeed the problem is in fact part of ticket 756 which was only half done. Category had been changed from "Customized Model" to "Plugin Model" but all the strings related to category manager were not. In several places there is a branch point of: if category is built-in then use the category manager managed lists and dictionaries, but if "custom" or "user" or now "plugin" then those lists do not know about it as they are dynamically changing. Unfortunately we now have a situation where category is "Plugin Model" but the check is against a string that is "Customized Model" since the compare is false it goes to the categary manager lists which of course know nothing about the model.

to:

1488125474793757

  • butler commented:

Correction to my previous comment. Branch ticket-756 works while the ESS build fails but in a different way for me than reported: the page freezes. It looks fine until one tries to click on the page or change a parameter. This is no doubt just a different manifestation of the same problem on different machines:

Indeed the problem is in fact part of ticket #872 which was only half done. Category had been changed from "Customized Model" to "Plugin Model" but all the strings related to category manager were not. In several places there is a branch point of: if category is built-in then use the category manager managed lists and dictionaries, but if "custom" or "user" or now "plugin" then those lists do not know about it as they are dynamically changing. Unfortunately we now have a situation where category is "Plugin Model" but the check is against a string that is "Customized Model" since the compare is false it goes to the categary manager lists which of course know nothing about the model.

@butlerpd
Copy link
Member

Trac update at 2017/02/26 16:10:12:

  • butler changed _comment0 from "Since this is really just a manifestation of ticket 756 I am closing as duplicate but am going to make a comment on that ticket to do extreme testing of that window when done and in particular check for the issue reported here." to "1488125451687644"
  • butler commented:

Since this is really just a manifestation of ticket #872 I am closing as duplicate but am going to make a comment on that ticket to do extreme testing of that window when done and in particular check for the issue reported here.

  • butler changed resolution from "" to "duplicate"
  • butler changed status from "assigned" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Minor Small job
Projects
None yet
Development

No branches or pull requests

2 participants