question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoConsoleScreenBufferError when executing the hello world example in Windows.

See original GitHub issue

Running on python 3.4, I was having trouble with django’s manage.py shell command. I’ve narrowed it down to the prompt_toolkit module and can demonstrate the problem with this simple code:

>>> import prompt_toolkit
>>> prompt_toolkit.prompt("Hi")
Hi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\site-packages\prompt_toolkit\shortcuts.py", line 545, in prompt
    eventloop=eventloop)
  File "C:\Python34\lib\site-packages\prompt_toolkit\shortcuts.py", line 626, in run_application
    result = cli.run(reset_current_buffer=False)
  File "C:\Python34\lib\site-packages\prompt_toolkit\interface.py", line 391, in run
    self.renderer.request_absolute_cursor_position()
  File "C:\Python34\lib\site-packages\prompt_toolkit\renderer.py", line 343, in request_absolute_cursor_position
    self._min_available_height = self.output.get_rows_below_cursor_position()
  File "C:\Python34\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 287, in get_rows_below_cursor_position
    info = self.get_win32_screen_buffer_info()
  File "C:\Python34\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 150, in get_win32_screen_buffer_info
    raise NoConsoleScreenBufferError
prompt_toolkit.terminal.win32_output.NoConsoleScreenBufferError: No Windows console found. Are you running cmd.exe?
>>>

Let me know what other information I can provide

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

21reactions
mahadicommented, Apr 16, 2019

I just saw, that you can check “Emulate terminal in output console” in your run/debug configuration to fix this error in PyCharm. For me this works.

image

4reactions
JumpsPumpscommented, Sep 24, 2018

Hi @jonathanslenders, I am facing this issue while running the python script from pyCharm. Not happening when directly ran from cmd.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NoConsoleScreenBufferError when executing the hello world ...
Running on python 3.4, I was having trouble with django's manage.py shell command. I've narrowed it down to the prompt_toolkit module and ...
Read more >
IPython NoConsoleScreenBufferError (Windows)
When running any line on the IPython CLI on Windows, most times I am getting a NoConsoleScreenBufferError and the console is terminated.
Read more >
No Windows console found. Are you running cm - CodeAntenna
NoConsoleScreenBufferError : No Windows console found. Are you running cm ... NoConsoleScreenBufferError when executing the hello world example in Windows.
Read more >
No Windows console found. Are you running cm_逆向涉猎的 ...
解决方案. PyCharm: 勾选Emulate terminal in output console选项即可. 参考. NoConsoleScreenBufferError when executing the hello world example ...
Read more >
Python Prompt Toolkit 3.0 — prompt_toolkit 3.0.36 ...
Runs on Linux, OS X, OpenBSD and Windows systems. ... Every prompt_toolkit application should also run in a telnet/ssh server or an asyncio...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found