#26295·spyder

Plot histogram error when using dataframe editor from an external plugin

Author: dpturibioCreated Aug 26, 2026Updated Sep 29, 2026
Labelstype:Bugcomponent:Variable Explorer

When using a Dataframe structure from a plugin, when the data is not linked with VariableExplorer and the "Plot histogram" button is selected, an error occurs in DataFrameView class, method plot_hist, line self.namespacebrowser.plot(plot_function), because namespacebrowser is None in this case(since it was not initialized via variable explorer).

Suggest to check namespacebrowser first as follows:

python
        if self.namespacebrowser is None:
            from spyder.plugins.variableexplorer.widgets.namespacebrowser import (
                NamespaceBrowser
            )
            NamespaceBrowser(self).plot(plot_function)
        else:
            self.namespacebrowser.plot(plot_function)

file: /spyder/plugins/variableexplorer/widgets/dataframeeditor.py