# Buggy code
def add_row(self, attr=None, condition_type=None, condition_value=None):
    model = self.cond_list.model()
    row = model.rowCount()
    model.insertRow(row)

    attr_combo = gui.OrangeComboBox(
        minimumContentsLength=12,
        sizeAdjustPolicy=QComboBox.AdjustToMinimumContentsLengthWithIcon,
    )
    attr_combo.row = row
    for var in self._visible_variables(self.data.domain):
        attr_combo.addItem(*gui.attributeItem(var))
    attr_combo.setCurrentIndex(attr or 0)
    self.cond_list.setCellWidget(row, 0, attr_combo)

    index = QPersistentModelIndex(model.index(row, 3))
    temp_button = QPushButton(
        "×",
        self,
        flat=True,
        styleSheet="* {font-size: 16pt; color: silver}*:hover {color: black}",
    )
    temp_button.clicked.connect(lambda: self.remove_one(index.row()))
    self.cond_list.setCellWidget(row, 3, temp_button)

    self.remove_all_button.setDisabled(False)
    self.set_new_operators(
        attr_combo, attr is not None, condition_type, condition_value
    )
    attr_combo.currentIndexChanged.connect(
        lambda _: self.set_new_operators(attr_combo, False)
    )

    self.cond_list.resizeRowToContents(row)


# Traceback (TypeError)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "<string>", line 10, in <module>
File "C:\Users\reads\AppData\Local\Continuum\miniconda3\envs\orange-spectroscopy\lib\site-packages\Orange\data\filter.py", line 64, in __call__
return data._filter_is_defined(self.columns, self.negate)
File "C:\Users\reads\AppData\Local\Continuum\miniconda3\envs\orange-spectroscopy\lib\site-packages\Orange\data\table.py", line 1141, in _filter_is_defined
remove = np.logical_or(remove, bn.anynan([col], axis=0))
File "C:\Users\reads\AppData\Local\Continuum\miniconda3\envs\orange-spectroscopy\lib\site-packages\bottleneck\slow\reduce.py", line 86, in anynan
return np.isnan(a).any(axis)
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

# Fixed code
def add_row(self, attr=None, condition_type=None, condition_value=None):
    model = self.cond_list.model()
    row = model.rowCount()
    model.insertRow(row)

    attr_combo = gui.OrangeComboBox(
        minimumContentsLength=12,
        sizeAdjustPolicy=QComboBox.AdjustToMinimumContentsLengthWithIcon,
    )
    attr_combo.row = row
    for var in self._visible_variables(self.data.domain):
        if isinstance(var, Variable):
            attr_combo.addItem(*gui.attributeItem(var))
        else:
            attr_combo.addItem(var)
    if isinstance(attr, str):
        attr_combo.setCurrentText(attr)
    else:
        attr_combo.setCurrentIndex(
            attr or len(self.AllTypes) - (attr_combo.count() == len(self.AllTypes))
        )
    self.cond_list.setCellWidget(row, 0, attr_combo)

    index = QPersistentModelIndex(model.index(row, 3))
    temp_button = QPushButton(
        "×",
        self,
        flat=True,
        styleSheet="* {font-size: 16pt; color: silver}*:hover {color: black}",
    )
    temp_button.clicked.connect(lambda: self.remove_one(index.row()))
    self.cond_list.setCellWidget(row, 3, temp_button)

    self.remove_all_button.setDisabled(False)
    self.set_new_operators(
        attr_combo, attr is not None, condition_type, condition_value
    )
    attr_combo.currentIndexChanged.connect(
        lambda _: self.set_new_operators(attr_combo, False)
    )

    self.cond_list.resizeRowToContents(row)