ipython: Ipython output broken since 7.0 over ssh connection

It seems like when I connect to one of our ECS containers over ssh, ipython no longer seems to display output correctly.

When I open IPython I get the following:

Python 3.7.1 (default, Oct 24 2018, 22:35:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.

as you can see, there is no prompt for inputting commands.

However, if I type something blindly - for example print("hello"), it outputs the result:

Python 3.7.1 (default, Oct 24 2018, 22:35:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.

hello

or if I type some random text and then press enter to get an intended error message:

Python 3.7.1 (default, Oct 24 2018, 22:35:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help.

hello

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-2c892af0f0c1> in <module>
----> 1 dawdwd

NameError: name 'dawdwd' is not defined

Not sure if this a bug with prompt_toolkit or ipython but I thought I would start here.

Let me know it there are any other details from the shell I can get to make debugging this easier.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 2
  • Comments: 16 (3 by maintainers)

Most upvoted comments

Your resize comment made me think to try running !reset.

Running !resize in ipython makes the issue go away. That should help narrow down the problem I think

Your resize comment made me think to try running !reset.

Running !resize in ipython makes the issue go away. That should help narrow down the problem I think

!reset Solved my invisible prompt issue I had using ipython in docker over ssh