diff --git a/spyder/plugins/variableexplorer/widgets/namespacebrowser.py b/spyder/plugins/variableexplorer/widgets/namespacebrowser.py index 18e60bacaf8..b7505b9e33e 100644 --- a/spyder/plugins/variableexplorer/widgets/namespacebrowser.py +++ b/spyder/plugins/variableexplorer/widgets/namespacebrowser.py @@ -381,6 +381,15 @@ def load_data(self, filename, ext): "

{extensions}").format( extensions=', '.join(IMPORT_EXT)) return msg + except TypeError: + msg = _( + "Spyder is unable to open the file you're trying to load. " + "This could be caused due to a difference between the package " + "versions used when you saved this spydata file and the ones " + "installed in the current environment. Please check the " + "compatibility between them (e.g. that you're using Numpy 2.x " + "in both environments).
" + ) except (UnpicklingError, RuntimeError, CommError): return None