jupyter / jupyter_console

Jupyter Terminal Console
http://jupyter-console.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
247 stars 146 forks source link

jupyter_console issue with prompt_toolkit 3.0.5 #214

Open itamarjp opened 4 years ago

itamarjp commented 4 years ago

jupyter_console tests fails with prompt_toolkit 3.0.5

I think it's a problem with prompt_toolkit 3.0.5, but I am reporting here too, more details ->

jupyter_console tests fails in prompt_toolkit/output/vt100.py line 449

fd = stdout.fileno()

with error io.UnsupportedOperation: fileno

ERROR: test_call_pil_by_default (jupyter_console.tests.test_image_handler.ZMQTerminalInteractiveShellTestCase)

https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1136

bnavigator commented 4 years ago

If you run nosetests without capturing stdout (-s or --nocapture), stdout will have a file descriptor and prompt_toolkit won't run into the UnsupportedOperation exception.

Carreau commented 3 years ago

jupyter console --simple-prompt might also help as it avoid using prompt_toolkit and use only "input()". but yes I've seen random failure with PTK, though this repository have been dormant and there will be a lot of work to bring it to a good state.