spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.2k stars 1.59k forks source link

IPython console on remote kernel output disappears #4406

Open shekhovt opened 7 years ago

shekhovt commented 7 years ago

Description of your problem

Ipython console loses some output in this test, first output from the script, then output of all command line commands.

What steps will reproduce the problem?

  1. Connect to an existing kernel running on a machine
  2. Type execfile('test0.py'), several times, where the script is
    print('Hello World!')
    print(bla)

    Observe

    
    Hello World!
    ---------------------------------------------------------------------------
    NameError                                 Traceback (most recent call last)
    <ipython-input-59-2162b22ed1e4> in <module>()
    ----> 1 execfile('test0.py')

/mnt/datagrid/personal/shekhovt/mobile_vis/software/python/flow_learning/tests/test0.py in () 1 print('Hello World!') ----> 2 print(bla) 3

NameError: name 'bla' is not defined

In [60]: execfile('test0.py') Hello World!

NameError Traceback (most recent call last)

in () ----> 1 execfile('test0.py') /mnt/datagrid/personal/shekhovt/mobile_vis/software/python/flow_learning/tests/test0.py in () 1 print('Hello World!') ----> 2 print(bla) 3 NameError: name 'bla' is not defined In [61]: execfile('test0.py') --------------------------------------------------------------------------- NameError Traceback (most recent call last) in () ----> 1 execfile('test0.py') /mnt/datagrid/personal/shekhovt/mobile_vis/software/python/flow_learning/tests/test0.py in () 1 print('Hello World!') ----> 2 print(bla) 3 NameError: name 'bla' is not defined ``` 3. Notice that in the last trial, the string "Hallow World" disappeared, now all commands generate no output: ``` In [70]: ls In [71]: pwd In [72]: who In [73]: ``` ## 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 Remote machine : python 2.7.9, Ipython 5.3.0 ##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 commented 7 years ago

I don't know what happens in this case. We'll take a look at it after we release 3.2.

shekhovt commented 7 years ago

Actually, for this one, the steps above do not reproduce the bug. But I encountered the issue repeatedly. I checked the kernel, it is still running, and works fine after reconnected, for some time...