prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Transpose remembers old unexisting data
  I have a table file  that I overwrite with different values (rows and columns stay the same). When using a certain version of the file with certain workflow the workflow remembers old data, that was previously overwritten (and does not exist on my disk anymore).  I could not replicate this in a new workflow made from scratch or with Orange data sets. However, it occurs even when I reopen Orange or when I copy the workflow to a new file. 
  Below are the workflow and the data and an image of what is happening. 
  
  ![Screenshot from 2020-01-23 11-41-55](https://user-images.githubusercontent.com/47607471/72978198-46e61180-3dd6-11ea-9d14-94cf9f1af850.png)
  
  [transpose_remembering.zip](https://github.com/biolab/orange3/files/4102632/transpose_remembering.zip)
  
  Orange: Last master.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `Orange/widgets/data/owtranspose.py`
  Content:
  ```
  1 from Orange.data import Table, ContinuousVariable, StringVariable
  2 from Orange.widgets.settings import (Setting, ContextSetting,
  3                                      DomainContextHandler)
  4 from Orange.widgets.utils.itemmodels import DomainModel
  5 from Orange.widgets.utils.widgetpreview import WidgetPreview
  6 from Orange.widgets.widget import OWWidget, Msg
  7 from Orange.widgets import gui
  8 from Orange.widgets.widget import Input, Output
  9 
  10 
  11 class OWTranspose(OWWidget):
  12     name = "Transpose"
  13     description = "Transpose data table."
  14     icon = "icons/Transpose.svg"
  15     priority = 2000
  16     keywords = []
  17 
  18     class Inputs:
  19         data = Input("Data", Table)
  20 
  21     class Outputs:
  22         data = Output("Data", Table, dynamic=False)
  23 
  24     GENERIC, FROM_VAR = range(2)
  25 
  26     resizing_enabled = False
  27     want_main_area = False
  28 
  29     DEFAULT_PREFIX = "Feature"
  30 
  31     settingsHandler = DomainContextHandler()
  32     feature_type = ContextSetting(GENERIC)
  33     feature_name = ContextSetting("")
  34     feature_names_column = ContextSetting(None)
  35     auto_apply = Setting(True)
  36 
  37     class Warning(OWWidget.Warning):
  38         duplicate_names = Msg("Values are not unique.\nTo avoid multiple "
  39                               "features with the same name, values \nof "
  40                               "'{}' have been augmented with indices.")
  41 
  42     class Error(OWWidget.Error):
  43         value_error = Msg("{}")
  44 
  45     def __init__(self):
  46         super().__init__()
  47         self.data = None
  48 
  49         # self.apply is changed later, pylint: disable=unnecessary-lambda
  50         box = gui.radioButtons(
  51             self.controlArea, self, "feature_type", box="Feature names",
  52             callback=lambda: self.apply())
  53 
  54         button = gui.appendRadioButton(box, "Generic")
  55         edit = gui.lineEdit(
  56             gui.indentedBox(box, gui.checkButtonOffsetHint(button)), self,
  57             "feature_name",
  58             placeholderText="Type a prefix ...", toolTip="Custom feature name")
  59         edit.editingFinished.connect(self._apply_editing)
  60 
  61         self.meta_button = gui.appendRadioButton(box, "From variable:")
  62         self.feature_model = DomainModel(
  63             valid_types=(ContinuousVariable, StringVariable),
  64             alphabetical=False)
  65         self.feature_combo = gui.comboBox(
  66             gui.indentedBox(box, gui.checkButtonOffsetHint(button)), self,
  67             "feature_names_column", contentsLength=12,
  68             callback=self._feature_combo_changed, model=self.feature_model)
  69 
  70         self.apply_button = gui.auto_apply(self.controlArea, self, box=False, commit=self.apply)
  71         self.apply_button.button.setAutoDefault(False)
  72 
  73         self.info.set_output_summary(self.info.NoInput)
  74         self.info.set_input_summary(self.info.NoInput)
  75 
  76         self.set_controls()
  77 
  78     def _apply_editing(self):
  79         self.feature_type = self.GENERIC
  80         self.feature_name = self.feature_name.strip()
  81         self.apply()
  82 
  83     def _feature_combo_changed(self):
  84         self.feature_type = self.FROM_VAR
  85         self.apply()
  86 
  87     @Inputs.data
  88     def set_data(self, data):
  89         # Skip the context if the combo is empty: a context with
  90         # feature_model == None would then match all domains
  91         if self.feature_model:
  92             self.closeContext()
  93         self.data = data
  94         if data:
  95             self.info.set_input_summary(len(data))
  96         else:
  97             self.info.set_input_summary(self.info.NoInput)
  98         self.set_controls()
  99         if self.feature_model:
  100             self.openContext(data)
  101         self.unconditional_apply()
  102 
  103     def set_controls(self):
  104         self.feature_model.set_domain(self.data and self.data.domain)
  105         self.meta_button.setEnabled(bool(self.feature_model))
  106         if self.feature_model:
  107             self.feature_names_column = self.feature_model[0]
  108             self.feature_type = self.FROM_VAR
  109         else:
  110             self.feature_names_column = None
  111 
  112     def apply(self):
  113         self.clear_messages()
  114         transposed = None
  115         if self.data:
  116             try:
  117                 variable = self.feature_type == self.FROM_VAR and \
  118                            self.feature_names_column
  119                 transposed = Table.transpose(
  120                     self.data, variable,
  121                     feature_name=self.feature_name or self.DEFAULT_PREFIX)
  122                 if variable:
  123                     names = self.data.get_column_view(variable)[0]
  124                     if len(names) != len(set(names)):
  125                         self.Warning.duplicate_names(variable)
  126                 self.info.set_output_summary(len(transposed))
  127             except ValueError as e:
  128                 self.Error.value_error(e)
  129         else:
  130             self.info.set_output_summary(self.info.NoInput)
  131         self.Outputs.data.send(transposed)
  132 
  133     def send_report(self):
  134         if self.feature_type == self.GENERIC:
  135             names = self.feature_name or self.DEFAULT_PREFIX
  136         else:
  137             names = "from variable"
  138             if self.feature_names_column:
  139                 names += "  '{}'".format(self.feature_names_column.name)
  140         self.report_items("", [("Feature names", names)])
  141         if self.data:
  142             self.report_data("Data", self.data)
  143 
  144 
  145 if __name__ == "__main__":  # pragma: no cover
  146     WidgetPreview(OWTranspose).run(Table("iris"))
  147
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/Orange/widgets/data/owtranspose.py b/Orange/widgets/data/owtranspose.py
  --- a/Orange/widgets/data/owtranspose.py
  +++ b/Orange/widgets/data/owtranspose.py
  @@ -38,6 +38,7 @@
           duplicate_names = Msg("Values are not unique.\nTo avoid multiple "
                                 "features with the same name, values \nof "
                                 "'{}' have been augmented with indices.")
  +        discrete_attrs = Msg("Categorical features have been encoded as numbers.")
   
       class Error(OWWidget.Error):
           value_error = Msg("{}")
  @@ -123,6 +124,8 @@
                       names = self.data.get_column_view(variable)[0]
                       if len(names) != len(set(names)):
                           self.Warning.duplicate_names(variable)
  +                if self.data.domain.has_discrete_attributes():
  +                    self.Warning.discrete_attrs()
                   self.info.set_output_summary(len(transposed))
               except ValueError as e:
                   self.Error.value_error(e)
  
verification_info: {"golden_diff": "diff --git a/Orange/widgets/data/owtranspose.py b/Orange/widgets/data/owtranspose.py\n--- a/Orange/widgets/data/owtranspose.py\n+++ b/Orange/widgets/data/owtranspose.py\n@@ -38,6 +38,7 @@\n         duplicate_names = Msg(\"Values are not unique.\\nTo avoid multiple \"\n                               \"features with the same name, values \\nof \"\n                               \"'{}' have been augmented with indices.\")\n+        discrete_attrs = Msg(\"Categorical features have been encoded as numbers.\")\n \n     class Error(OWWidget.Error):\n         value_error = Msg(\"{}\")\n@@ -123,6 +124,8 @@\n                     names = self.data.get_column_view(variable)[0]\n                     if len(names) != len(set(names)):\n                         self.Warning.duplicate_names(variable)\n+                if self.data.domain.has_discrete_attributes():\n+                    self.Warning.discrete_attrs()\n                 self.info.set_output_summary(len(transposed))\n             except ValueError as e:\n                 self.Error.value_error(e)\n", "issue": "Transpose remembers old unexisting data\nI have a table file  that I overwrite with different values (rows and columns stay the same). When using a certain version of the file with certain workflow the workflow remembers old data, that was previously overwritten (and does not exist on my disk anymore).  I could not replicate this in a new workflow made from scratch or with Orange data sets. However, it occurs even when I reopen Orange or when I copy the workflow to a new file. \r\nBelow are the workflow and the data and an image of what is happening. \r\n\r\n![Screenshot from 2020-01-23 11-41-55](https://user-images.githubusercontent.com/47607471/72978198-46e61180-3dd6-11ea-9d14-94cf9f1af850.png)\r\n\r\n[transpose_remembering.zip](https://github.com/biolab/orange3/files/4102632/transpose_remembering.zip)\r\n\r\nOrange: Last master.\r\n\n", "before_files": [{"content": "from Orange.data import Table, ContinuousVariable, StringVariable\nfrom Orange.widgets.settings import (Setting, ContextSetting,\n                                     DomainContextHandler)\nfrom Orange.widgets.utils.itemmodels import DomainModel\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import OWWidget, Msg\nfrom Orange.widgets import gui\nfrom Orange.widgets.widget import Input, Output\n\n\nclass OWTranspose(OWWidget):\n    name = \"Transpose\"\n    description = \"Transpose data table.\"\n    icon = \"icons/Transpose.svg\"\n    priority = 2000\n    keywords = []\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data = Output(\"Data\", Table, dynamic=False)\n\n    GENERIC, FROM_VAR = range(2)\n\n    resizing_enabled = False\n    want_main_area = False\n\n    DEFAULT_PREFIX = \"Feature\"\n\n    settingsHandler = DomainContextHandler()\n    feature_type = ContextSetting(GENERIC)\n    feature_name = ContextSetting(\"\")\n    feature_names_column = ContextSetting(None)\n    auto_apply = Setting(True)\n\n    class Warning(OWWidget.Warning):\n        duplicate_names = Msg(\"Values are not unique.\\nTo avoid multiple \"\n                              \"features with the same name, values \\nof \"\n                              \"'{}' have been augmented with indices.\")\n\n    class Error(OWWidget.Error):\n        value_error = Msg(\"{}\")\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        # self.apply is changed later, pylint: disable=unnecessary-lambda\n        box = gui.radioButtons(\n            self.controlArea, self, \"feature_type\", box=\"Feature names\",\n            callback=lambda: self.apply())\n\n        button = gui.appendRadioButton(box, \"Generic\")\n        edit = gui.lineEdit(\n            gui.indentedBox(box, gui.checkButtonOffsetHint(button)), self,\n            \"feature_name\",\n            placeholderText=\"Type a prefix ...\", toolTip=\"Custom feature name\")\n        edit.editingFinished.connect(self._apply_editing)\n\n        self.meta_button = gui.appendRadioButton(box, \"From variable:\")\n        self.feature_model = DomainModel(\n            valid_types=(ContinuousVariable, StringVariable),\n            alphabetical=False)\n        self.feature_combo = gui.comboBox(\n            gui.indentedBox(box, gui.checkButtonOffsetHint(button)), self,\n            \"feature_names_column\", contentsLength=12,\n            callback=self._feature_combo_changed, model=self.feature_model)\n\n        self.apply_button = gui.auto_apply(self.controlArea, self, box=False, commit=self.apply)\n        self.apply_button.button.setAutoDefault(False)\n\n        self.info.set_output_summary(self.info.NoInput)\n        self.info.set_input_summary(self.info.NoInput)\n\n        self.set_controls()\n\n    def _apply_editing(self):\n        self.feature_type = self.GENERIC\n        self.feature_name = self.feature_name.strip()\n        self.apply()\n\n    def _feature_combo_changed(self):\n        self.feature_type = self.FROM_VAR\n        self.apply()\n\n    @Inputs.data\n    def set_data(self, data):\n        # Skip the context if the combo is empty: a context with\n        # feature_model == None would then match all domains\n        if self.feature_model:\n            self.closeContext()\n        self.data = data\n        if data:\n            self.info.set_input_summary(len(data))\n        else:\n            self.info.set_input_summary(self.info.NoInput)\n        self.set_controls()\n        if self.feature_model:\n            self.openContext(data)\n        self.unconditional_apply()\n\n    def set_controls(self):\n        self.feature_model.set_domain(self.data and self.data.domain)\n        self.meta_button.setEnabled(bool(self.feature_model))\n        if self.feature_model:\n            self.feature_names_column = self.feature_model[0]\n            self.feature_type = self.FROM_VAR\n        else:\n            self.feature_names_column = None\n\n    def apply(self):\n        self.clear_messages()\n        transposed = None\n        if self.data:\n            try:\n                variable = self.feature_type == self.FROM_VAR and \\\n                           self.feature_names_column\n                transposed = Table.transpose(\n                    self.data, variable,\n                    feature_name=self.feature_name or self.DEFAULT_PREFIX)\n                if variable:\n                    names = self.data.get_column_view(variable)[0]\n                    if len(names) != len(set(names)):\n                        self.Warning.duplicate_names(variable)\n                self.info.set_output_summary(len(transposed))\n            except ValueError as e:\n                self.Error.value_error(e)\n        else:\n            self.info.set_output_summary(self.info.NoInput)\n        self.Outputs.data.send(transposed)\n\n    def send_report(self):\n        if self.feature_type == self.GENERIC:\n            names = self.feature_name or self.DEFAULT_PREFIX\n        else:\n            names = \"from variable\"\n            if self.feature_names_column:\n                names += \"  '{}'\".format(self.feature_names_column.name)\n        self.report_items(\"\", [(\"Feature names\", names)])\n        if self.data:\n            self.report_data(\"Data\", self.data)\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWTranspose).run(Table(\"iris\"))\n", "path": "Orange/widgets/data/owtranspose.py"}], "after_files": [{"content": "from Orange.data import Table, ContinuousVariable, StringVariable\nfrom Orange.widgets.settings import (Setting, ContextSetting,\n                                     DomainContextHandler)\nfrom Orange.widgets.utils.itemmodels import DomainModel\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import OWWidget, Msg\nfrom Orange.widgets import gui\nfrom Orange.widgets.widget import Input, Output\n\n\nclass OWTranspose(OWWidget):\n    name = \"Transpose\"\n    description = \"Transpose data table.\"\n    icon = \"icons/Transpose.svg\"\n    priority = 2000\n    keywords = []\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data = Output(\"Data\", Table, dynamic=False)\n\n    GENERIC, FROM_VAR = range(2)\n\n    resizing_enabled = False\n    want_main_area = False\n\n    DEFAULT_PREFIX = \"Feature\"\n\n    settingsHandler = DomainContextHandler()\n    feature_type = ContextSetting(GENERIC)\n    feature_name = ContextSetting(\"\")\n    feature_names_column = ContextSetting(None)\n    auto_apply = Setting(True)\n\n    class Warning(OWWidget.Warning):\n        duplicate_names = Msg(\"Values are not unique.\\nTo avoid multiple \"\n                              \"features with the same name, values \\nof \"\n                              \"'{}' have been augmented with indices.\")\n        discrete_attrs = Msg(\"Categorical features have been encoded as numbers.\")\n\n    class Error(OWWidget.Error):\n        value_error = Msg(\"{}\")\n\n    def __init__(self):\n        super().__init__()\n        self.data = None\n\n        # self.apply is changed later, pylint: disable=unnecessary-lambda\n        box = gui.radioButtons(\n            self.controlArea, self, \"feature_type\", box=\"Feature names\",\n            callback=lambda: self.apply())\n\n        button = gui.appendRadioButton(box, \"Generic\")\n        edit = gui.lineEdit(\n            gui.indentedBox(box, gui.checkButtonOffsetHint(button)), self,\n            \"feature_name\",\n            placeholderText=\"Type a prefix ...\", toolTip=\"Custom feature name\")\n        edit.editingFinished.connect(self._apply_editing)\n\n        self.meta_button = gui.appendRadioButton(box, \"From variable:\")\n        self.feature_model = DomainModel(\n            valid_types=(ContinuousVariable, StringVariable),\n            alphabetical=False)\n        self.feature_combo = gui.comboBox(\n            gui.indentedBox(box, gui.checkButtonOffsetHint(button)), self,\n            \"feature_names_column\", contentsLength=12,\n            callback=self._feature_combo_changed, model=self.feature_model)\n\n        self.apply_button = gui.auto_apply(self.controlArea, self, box=False, commit=self.apply)\n        self.apply_button.button.setAutoDefault(False)\n\n        self.info.set_output_summary(self.info.NoInput)\n        self.info.set_input_summary(self.info.NoInput)\n\n        self.set_controls()\n\n    def _apply_editing(self):\n        self.feature_type = self.GENERIC\n        self.feature_name = self.feature_name.strip()\n        self.apply()\n\n    def _feature_combo_changed(self):\n        self.feature_type = self.FROM_VAR\n        self.apply()\n\n    @Inputs.data\n    def set_data(self, data):\n        # Skip the context if the combo is empty: a context with\n        # feature_model == None would then match all domains\n        if self.feature_model:\n            self.closeContext()\n        self.data = data\n        if data:\n            self.info.set_input_summary(len(data))\n        else:\n            self.info.set_input_summary(self.info.NoInput)\n        self.set_controls()\n        if self.feature_model:\n            self.openContext(data)\n        self.unconditional_apply()\n\n    def set_controls(self):\n        self.feature_model.set_domain(self.data and self.data.domain)\n        self.meta_button.setEnabled(bool(self.feature_model))\n        if self.feature_model:\n            self.feature_names_column = self.feature_model[0]\n            self.feature_type = self.FROM_VAR\n        else:\n            self.feature_names_column = None\n\n    def apply(self):\n        self.clear_messages()\n        transposed = None\n        if self.data:\n            try:\n                variable = self.feature_type == self.FROM_VAR and \\\n                           self.feature_names_column\n                transposed = Table.transpose(\n                    self.data, variable,\n                    feature_name=self.feature_name or self.DEFAULT_PREFIX)\n                if variable:\n                    names = self.data.get_column_view(variable)[0]\n                    if len(names) != len(set(names)):\n                        self.Warning.duplicate_names(variable)\n                if self.data.domain.has_discrete_attributes():\n                    self.Warning.discrete_attrs()\n                self.info.set_output_summary(len(transposed))\n            except ValueError as e:\n                self.Error.value_error(e)\n        else:\n            self.info.set_output_summary(self.info.NoInput)\n        self.Outputs.data.send(transposed)\n\n    def send_report(self):\n        if self.feature_type == self.GENERIC:\n            names = self.feature_name or self.DEFAULT_PREFIX\n        else:\n            names = \"from variable\"\n            if self.feature_names_column:\n                names += \"  '{}'\".format(self.feature_names_column.name)\n        self.report_items(\"\", [(\"Feature names\", names)])\n        if self.data:\n            self.report_data(\"Data\", self.data)\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWTranspose).run(Table(\"iris\"))\n", "path": "Orange/widgets/data/owtranspose.py"}]}