Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError when using example #174

Open
mrpbennett opened this issue Jan 14, 2022 · 0 comments
Open

AssertionError when using example #174

mrpbennett opened this issue Jan 14, 2022 · 0 comments

Comments

@mrpbennett
Copy link

I have tried to use the example here:

from __future__ import print_function, unicode_literals
from PyInquirer import prompt, print_json

questions = [
    {
        'type': 'input',
        'name': 'first_name',
        'message': 'What\'s your first name',
    }
]

answers = prompt(questions)
print_json(answers)  # use the answers as input for your app

But I keep getting the following error and not sure why

Traceback (most recent call last):
  File "/Users/paul/Developer/pycharm/pp_npi_api/app.py", line 28, in <module>
    answers = prompt(step_one)
  File "/Users/paul/.local/share/virtualenvs/pp_npi_api-yfFkFqSk/lib/python3.9/site-packages/PyInquirer/prompt.py", line 69, in prompt
    answer = run_application(
  File "/Users/paul/.local/share/virtualenvs/pp_npi_api-yfFkFqSk/lib/python3.9/site-packages/prompt_toolkit/shortcuts.py", line 576, in run_application
    output=create_output(true_color=true_color))
  File "/Users/paul/.local/share/virtualenvs/pp_npi_api-yfFkFqSk/lib/python3.9/site-packages/prompt_toolkit/shortcuts.py", line 124, in create_output
    return Vt100_Output.from_pty(
  File "/Users/paul/.local/share/virtualenvs/pp_npi_api-yfFkFqSk/lib/python3.9/site-packages/prompt_toolkit/terminal/vt100_output.py", line 424, in from_pty
    assert stdout.isatty()
AssertionError
@CITGuru CITGuru reopened this Aug 10, 2022
@CITGuru CITGuru closed this as completed Aug 10, 2022
@CITGuru CITGuru reopened this Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants