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

[FIX] Preprocess Widget: Continuize type error #1978

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Due to 60e1369 the ContinuizeEditor raises an:

----------------------------- TypeError Exception -----------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange3/Orange/canvas/scheme/widgetsscheme.py", line 454, in create_widget_instance
    widget.__init__()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owpreprocess.py", line 1015, in __init__
    self._initialize()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owpreprocess.py", line 1036, in _initialize
    self.set_model(model)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owpreprocess.py", line 1108, in set_model
    self.controler.setModel(ppmodel)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/utils/preprocess.py", line 265, in setModel
    self._initialize(model)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/utils/preprocess.py", line 276, in _initialize
    self._insertWidgetFor(i, index)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/utils/preprocess.py", line 398, in _insertWidgetFor
    widget = self.createWidgetFor(index)
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/utils/preprocess.py", line 415, in createWidgetFor
    widget = definition.viewclass()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/data/owpreprocess.py", line 218, in __init__
    group.addButton(rb, int(treatment))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'Continuize'
-------------------------------------------------------------------------------
Description of changes

Map the enum value to an integer index for internal radio button id use.

Includes
  • Code changes
  • Tests
  • Documentation

Due to 60e1369 the editor raises
an "TypeError: int() argument must be a string, a bytes-like object or a
number, not 'Continuize'"
@ales-erjavec ales-erjavec added this to the future milestone Jan 30, 2017
@ales-erjavec
Copy link
Contributor Author

Note that this applies to master only. The 60e1369 did not make it into 3.3.10

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request head (fixes/preprocess-continuize-type-error@59d2d7f).


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75de2c8...59d2d7f. Read the comment docs.

@astaric astaric merged commit 292a5a7 into biolab:master Feb 9, 2017
@astaric astaric modified the milestone: future Apr 19, 2017
@ales-erjavec ales-erjavec deleted the fixes/preprocess-continuize-type-error branch May 12, 2017 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants