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

Error while restarting kernel #7882

Closed
10 tasks done
bcolsen opened this issue Sep 12, 2018 · 3 comments
Closed
10 tasks done

Error while restarting kernel #7882

bcolsen opened this issue Sep 12, 2018 · 3 comments

Comments

@bcolsen
Copy link
Member

bcolsen commented Sep 12, 2018

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

When I restart my kernel I get this error:

Traceback (most recent call last):
  File "/home/user/spyder/spyder/plugins/ipythonconsole/plugin.py", line 1661, in restart_kernel
    stderr = self.get_stderr_file_handle(stderr_file)
AttributeError: 'IPythonConsole' object has no attribute 'get_stderr_file_handle

I think there shouldn't be a self in there. But when I fixed that, then I get:

Traceback (most recent call last):
  File "/home/bcolsen/spyder/spyder/plugins/ipythonconsole/plugin.py", line 1663, in restart_kernel
    client.restart_kernel(stderr=stderr)
TypeError: restart_kernel() got an unexpected keyword argument 'stderr'

client.restart_kernel doesn't have any args so I'm not sure what this code is supposed to do.

I think #7829 was the last PR in this section.

What steps reproduce the problem?

  1. restart the kernel

What is the expected output? What do you see instead?

doesn't restart

Paste Traceback/Error Below (if applicable)

Traceback (most recent call last):
  File "/home/user/spyder/spyder/plugins/ipythonconsole/plugin.py", line 1661, in restart_kernel
    stderr = self.get_stderr_file_handle(stderr_file)
AttributeError: 'IPythonConsole' object has no attribute 'get_stderr_file_handle

Versions

  • Spyder version: 4.0.0.dev0 (Commit: 39245fb)
  • Python version: 3.6.5 64-bit
  • Qt version: 5.9.4
  • PyQt version: 5.9.2
  • Operating System name/version: Linux

Dependencies

pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.7.5 (OK)
psutil >=0.3      :  5.4.6 (OK)
pyls >=0.19.0     :  0.19.0 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  0.23.1 (OK)
numpy >=1.7       :  1.14.5 (OK)
sympy >=0.7.3     :  1.1.1 (OK)
cython >=0.21     :  0.28.3 (OK)
qtconsole >=4.2.0 :  4.3.1 (OK)
IPython >=4.0     :  6.4.0 (OK)
matplotlib >=2.0.0:  2.2.2 (OK)
pylint >=0.25     :  1.9.2 (OK)
@ccordoba12 ccordoba12 changed the title Error while restarting kernel on master Error while restarting kernel Sep 12, 2018
@ccordoba12 ccordoba12 added this to the v3.3.2 milestone Sep 12, 2018
@ccordoba12
Copy link
Member

I don't understand why our tests didn't detect this regression. But I'll fix it today for sure.

@bcolsen
Copy link
Member Author

bcolsen commented Sep 12, 2018

I had a look at the test. It looks like it only covers Client.restart_kernel which work fine.

@ccordoba12
Copy link
Member

I see, so we need to test also at the plugin level.

Since I was the one who wrote that test, shame on me ;-p

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

No branches or pull requests

2 participants