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

Example checkbox_dialog.py doesn't work

Open
#959 1 comment 0 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

Hello.
I use it conveniently.
Report problems found during use.

Execution environment

OS: Mac OS Mojave 10.14.6
Python(pyenv): 3.7.4
prompt-toolkit: 2.0.9

Reproduction procedure and error log

The sample in example does not work.
Specifically, when "checkbox_dialog.py" is executed like the following command, an error occurs,
The program is not executed (GUI is not displayed and the program ends with an error).

$ pip install prompt_toolkit

$ git clone https://github.com/prompt-toolkit/python-prompt-toolkit.git
$ cd /python-prompt-toolkit/examples/dialogs
$ python checkbox_dialog.py
Traceback (most recent call last):
  File "checkbox_dialog.py", line 7, in <module>
    from prompt_toolkit.shortcuts import checkboxlist_dialog, message_dialog
ImportError: cannot import name 'checkboxlist_dialog' from 'prompt_toolkit.shortcuts' (/Users/xxxx/.pyenv/versions/3.7.4/lib/python3.7/site-packages/prompt_toolkit/shortcuts/__init__.py)

Thanks.

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

Start with examples/dialogs/checkbox_dialog.py and reproduce the ImportError using the Python 3.7.4 and prompt-toolkit 2.0.9 environment described. Check the referenced import and related shortcut definitions; done means the example starts without the reported error and displays its GUI.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.