Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #23812 on branch 6.x (PR: Handle TypeError when loading a .spydata file (Variable Explorer)) #23827

Open
wants to merge 1 commit into
base: 6.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions spyder/plugins/variableexplorer/widgets/namespacebrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,15 @@ def load_data(self, filename, ext):
"<br><br><tt>{extensions}</tt>").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).<br>"
)
except (UnpicklingError, RuntimeError, CommError):
return None

Expand Down
Loading