Skip to content

Commit

Permalink
Merge pull request #1905 from ales-erjavec/fixes/feature-constructor-…
Browse files Browse the repository at this point in the history
…index-error

[FIX] owfeaturecontructor: Fix an IndexError accessing exception's args
  • Loading branch information
lanzagar authored Jan 13, 2017
2 parents be928f7 + 3adcd20 commit 4dad654
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Orange/widgets/data/owfeatureconstructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import builtins
import math
import random
import logging

from traceback import format_exception_only
from collections import namedtuple, OrderedDict
from itertools import chain, count

Expand Down Expand Up @@ -581,7 +584,9 @@ def remove_invalid_expression(desc):
try:
data = Orange.data.Table(new_domain, self.data)
except Exception as err:
self.error(err.args[0])
log = logging.getLogger(__name__)
log.error("", exc_info=True)
self.error("".join(format_exception_only(type(err), err)).rstrip())
return
disc_attrs_not_ok = self.check_attrs_values(
[var for var in attrs if var.is_discrete], data)
Expand Down

0 comments on commit 4dad654

Please sign in to comment.