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

PR: Fix error when executing in a dedicated console and the interpreter doesn't have spyder-kernels installed or its right version #23511

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsbautista
Copy link
Contributor

Description of Changes

Check that the client was created, otherwise it will not be possible to rename

Issue(s) Resolved

Fixes #21884

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:
@jsbautista

@ccordoba12 ccordoba12 changed the title [PR]: Fix AttributeError when executing in a dedicated console and the interpreter was set to an environment without spyder-kernels installed/correct version installed PR: Fix error when executing in a dedicated console and the interpreter doesn't have spyder-kernels installed or its right version Jan 19, 2025
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small suggestion for you @jsbautista.

client.allow_rename = False
tab_text = self.disambiguate_fname(filename)
self.rename_client_tab(client, tab_text)
if (client):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (client):
if client is not None:

According to issue #21884, the problem happens when we reach this point and client is None. So we can improve a little bit this validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants