biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.85k stars 1.01k forks source link

Re-adding File widget gives an error #5339

Closed thocevar closed 3 years ago

thocevar commented 3 years ago

Deleting a File widget from canvas and adding it back results in an error. I didn't find other affected widgets.

  File "orange3\Orange\widgets\data\owfile.py", line 157, in __init__
    RecentPathsWComboMixin.__init__(self)
  File "orange-widget-base\orangewidget\utils\filedialogs.py", line 422, in __init__
    super().__init__()
  File "orange-widget-base\orangewidget\utils\filedialogs.py", line 361, in __init__
    self._relocate_recent_files()
  File "orange-widget-base\orangewidget\utils\filedialogs.py", line 378, in _relocate_recent_files
    kwargs = dict(title=recent.title, sheet=recent.sheet, file_format=recent.file_format)
AttributeError: 'dict' object has no attribute 'title'

@ajdapretnar reports that she can replicate this bug since updating orange-widget-base with https://github.com/biolab/orange-widget-base/pull/62

janezd commented 3 years ago

I believe https://github.com/biolab/orange-widget-base/pull/141 should fix this. Please try. We have waited for too long (almost a year) with this, and my familiarity with the code has faded.

It is interesting that the File widget (and other file-reading widgets) is the only widget with this problem - it seems it's the only one that has a setting which is a class, but is not a context setting. Though such widgets may appear in add-ons, of course.