prompt-toolkit / prompt-toolkit/python-prompt-toolkit

AssertionError raised when using prompt in Pycharm

Open
#404 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

Trying the simple example in the documentation leads to an assertion error. Here is the example:

from __future__ import unicode_literals
from prompt_toolkit import prompt

text = prompt('Give me some input: ')
print('You said: %s' % text)

Here is the error:

File "/opt/anaconda/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 425, in from_pty
  assert stdout.isatty()
AssertionError

I am using prompt_toolkit version 1.0.7 and Pycharm 2016.2.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the documented prompt example in PyCharm 2016.2.2 with prompt_toolkit 1.0.7. Inspect prompt_toolkit/terminal/vt100_output.py around from_pty at line 425, where the assertion is reported. Done means the example runs in PyCharm without raising AssertionError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.