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

Debugging hangs in iPython console #4403

Closed
shekhovt opened this issue Apr 26, 2017 · 1 comment
Closed

Debugging hangs in iPython console #4403

shekhovt opened this issue Apr 26, 2017 · 1 comment

Comments

@shekhovt
Copy link

Description of your problem

Debugging hangs in iPython console, various unexpected behaviour, kernel dies

What steps will reproduce the problem?

  1. Press "Debug file" hallo.py containing single line
print('Hello World!')

See

In [1]: debugfile('/home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests/hallo.py', wdir='/home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests')
> /home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests/hallo.py(1)<module>()
----> 1 print('Hello World!')

ipdb> 
  1. Press Debug -> Continue
Hello World!
ipdb> 
  1. The debugging session does not return. Press Stop debugging , Stop Current command -- does nothing
  2. Press "Run file"
Hello World!
In [3]: runfile('/home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests/hallo.py', wdir='/home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests')

(unexpected output order, command stands in the command line after it has been executed)
5. Press ESC

In [3]:
  1. Press "Debug file"
In [3]: debugfile('/home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests/hallo.py', wdir='/home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests')
> /home.zam/shekhovt/datagrid/mobile_vis/software/python/flow_learning/tests/hallo.py(1)<module>()
----> 1 print('Hello World!')
  1. Press "run current line"
    Get errors in the internal console:
Spyder Internal Console

This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
  spy.app, spy.window, dir(spy)

Please don't use it to run your code

>>> WARNING:traitlets:kernel died: 6.00105190277
WARNING:traitlets:kernel died: 5.99965310097
WARNING:traitlets:kernel died: 5.99938297272
WARNING:traitlets:kernel died: 6.00208210945
WARNING:traitlets:kernel died: 5.99959206581
Traceback (most recent call last):
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/plugins/editor.py", line 765, in <lambda>
    triggered=lambda: self.debug_command("continue"))
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/plugins/editor.py", line 2281, in debug_command
    self.main.ipyconsole.write_to_stdin(command)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py", line 881, in write_to_stdin
    sw.write_to_stdin(line)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 73, in write_to_stdin
    self._post_exec_input(line)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 88, in _post_exec_input
    self.silent_exec_input("!get_ipython().kernel.get_pdb_step()")
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 51, in silent_exec_input
    fname = self._input_reply['fname']
KeyError: 'fname'
WARNING:traitlets:kernel died: 5.99943113327
Traceback (most recent call last):
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/internalshell.py", line 237, in stderr_avail
    self.write(data, error=True)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/shell.py", line 584, in write
    self.flush(error=error)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/internalshell.py", line 320, in flush
    raise KeyboardInterrupt
KeyboardInterrupt
WARNING:traitlets:kernel died: 6.00266599655
WARNING:traitlets:kernel died: 6.00464200974
WARNING:traitlets:kernel died: 5.99945998192
WARNING:traitlets:kernel died: 6.00218105316
Traceback (most recent call last):
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/plugins/editor.py", line 765, in <lambda>
    triggered=lambda: self.debug_command("continue"))
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/plugins/editor.py", line 2281, in debug_command
    self.main.ipyconsole.write_to_stdin(command)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py", line 881, in write_to_stdin
    sw.write_to_stdin(line)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 73, in write_to_stdin
    self._post_exec_input(line)
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 88, in _post_exec_input
    self.silent_exec_input("!get_ipython().kernel.get_pdb_step()")
  File "/Users/shekhovt/anaconda/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 51, in silent_exec_input
    fname = self._input_reply['fname']
KeyError: 'fname'

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

Should be clear from above. I mean, I am new to python and spyder, just trying to make first basic steps, but here I am filing bug reports straight away.

Please provide any additional information below

With python console the experience is better.

Versions and main components

  • Spyder Version: 3.1.3
  • Python Version: 2.7.13 64bits
  • Qt Version: 5.6.2
  • PyQt Version: 5 5.6
  • Anaconda 4.3.16
  • Operating system: Mac OS 10.10.5

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

jedi =0.9.0 : 0.9.0 (OK)
matplotlib >=1.0 : 2.0.0 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.3 (OK)
pandas >=0.13.1 : 0.19.2 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 5.0.1 (OK)
pyflakes >=0.5.0 : 1.5.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.5.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12
Copy link
Member

This is a bug and it's going to be fixed in Spyder 3.2 (to be released in a couple of months).

Sorry for the inconvenience and thanks for reporting.

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