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: Catch any error generated when trying to start kernels #7717

Merged
merged 1 commit into from
Aug 18, 2018
Merged
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
10 changes: 9 additions & 1 deletion spyder/plugins/ipythonconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,15 @@ def create_kernel_manager_and_kernel_client(self, connection_file,
stderr = None
else:
stderr = None
kernel_manager.start_kernel(stderr=stderr)

# Catch any error generated when trying to start the kernel
# See issue 7302
try:
kernel_manager.start_kernel(stderr=stderr)
except Exception:
error_msg = _("The error is:<br><br>"
"<tt>{}</tt>").format(traceback.format_exc())
return (error_msg, None)

# Kernel client
kernel_client = kernel_manager.client()
Expand Down