ipython: IPython terminal prompt missing after upgrading from 2.3.1 to 5.1.0

I just recently upgraded IPython from 2.3.1 to 5.1.0. Right off the bat, the terminal command prompt is missing although I can type stuff in but it won’t echo back either. Execution of the code seems to be working but I can’t know for sure. By the way, if I execute ipython --simple-prompt it seems to be working as usual with terminal prompts.

I am aware of the doc here but still have no clue why simply typing ipython won’t show me the prompt.

See diagnostics info below.

root@api-2712513810-9iimk:/api# ipython --debug
[TerminalIPythonApp] IPYTHONDIR set to: /root/.ipython
[TerminalIPythonApp] Using existing profile dir: '/root/.ipython/profile_default'
[TerminalIPythonApp] Searching path ['/api', '/root/.ipython/profile_default', '/usr/local/etc/ipython', '/etc/ipython'] for config files
[TerminalIPythonApp] Attempting to load config file: ipython_config.py
[TerminalIPythonApp] Looking for ipython_config in /etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /usr/local/etc/ipython
[TerminalIPythonApp] Looking for ipython_config in /root/.ipython/profile_default
[TerminalIPythonApp] Looking for ipython_config in /api
Python 3.5.2 (default, Nov 17 2016, 22:42:56) 
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

[TerminalIPythonApp] Loading IPython extensions...
[TerminalIPythonApp] Loading IPython extension: storemagic
[TerminalIPythonApp] Starting IPython's mainloop...





root@api-2712513810-9iimk:/api# 
root@api-2712513810-9iimk:/api# 
root@api-2712513810-9iimk:/api# ipython --simple-prompt
Python 3.5.2 (default, Nov 17 2016, 22:42:56) 
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: exit

root@api-2712513810-9iimk:/api# python -c "import IPython; print(IPython.sys_info())"                  
{'commit_hash': '5c9c918',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/usr/local/lib/python3.5/site-packages/IPython',
 'ipython_version': '5.1.0',
 'os_name': 'posix',
 'platform': 'Linux-4.4.14-boot2docker-x86_64-with-debian-8.6',
 'sys_executable': '/usr/local/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.5.2 (default, Nov 17 2016, 22:42:56) \n[GCC 4.9.2]'}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 26 (14 by maintainers)

Most upvoted comments

possibly some more clues:

having a similar using empire (also uses docker)

$ tty
/dev/console

$ ipython
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

Out[1]: 'hello world'

Do you really want to exit ([y]/n)?

(note Out but no In)

if i call reset, either from bash before launching, or from inside ipython via !reset it starts working

FYI: this was fixed in https://github.com/jonathanslenders/python-prompt-toolkit/commit/e73b9212991d84aed56d004223ead01d8156a369 I still need to push a new release of prompt_toolkit.

If the terminal reports 0x0 as a size, then indeed it won’t draw anything. If that’s the case, I agree that we can fallback to the default size (80x24).

It’s this function: https://github.com/jonathanslenders/python-prompt-toolkit/blob/master/prompt_toolkit/terminal/vt100_output.py#L344

@davidszotten: Are you able to test this and create a pull request?