-
Notifications
You must be signed in to change notification settings - Fork 747
Closed
Description
Hello,
I am using version 2.0.7 with python 2.7
~/programming/card-game-maxeta % pip install prompt_toolkit
Requirement already satisfied: prompt_toolkit in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (2.0.7)
Requirement already satisfied: wcwidth in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from prompt_toolkit) (0.1.7)
Requirement already satisfied: six>=1.9.0 in /Library/Python/2.7/site-packages (from prompt_toolkit) (1.11.0)
and I am running the python file pt_fun.py
whose contents is
from prompt_toolkit import prompt
from prompt_toolkit.completion import WordCompleter
html_completer = WordCompleter(['<html>', '<body>', '<head>', '<title>'])
text = prompt('Enter HTML: ', completer=html_completer)
print('You said: %s' % text)
which is verbatim what is shown in the stable and 2.0.7 docs.
It throws the error:
~/programming/card-game-maxeta % python pt_fun.py
Traceback (most recent call last):
File "pt_fun.py", line 5, in <module>
text = prompt('Enter HTML: ', completer=html_completer)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/prompt_toolkit/shortcuts/prompt.py", line 840, in prompt
^[[32;1R return session.prompt(*a, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/prompt_toolkit/shortcuts/prompt.py", line 733, in prompt
return run_sync()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/prompt_toolkit/shortcuts/prompt.py", line 722, in run_sync
return self.app.run(inputhook=self.inputhook, pre_run=pre_run2)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/prompt_toolkit/application/application.py", line 699, in run
return run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/prompt_toolkit/application/application.py", line 673, in run
return f.result()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/prompt_toolkit/eventloop/future.py", line 149, in result
raise self._exception
AssertionError
Thank you,
Matthew
Metadata
Metadata
Assignees
Labels
No labels