GeezerVison is showing github.com — 'FakeStdin' object has no attribute 'fileno' · Issue #989 · bpython/bpython
'FakeStdin' object has no attribute 'fileno' #989DescriptionI know there has been some discussion on this. #232, for example.
I don't know if this merits trying to figure out a solution, but it would be nice to be able to play with Questionary in BPython. :)
bpython version 0.22.1 on top of Python 3.10.6 /usr/bin/python3
>>> import questionary
>>> questionary.text("What's your name?",).ask()
Traceback (most recent call last):
File "<input>", line 1, in <module>
questionary.text("What's your name?",).ask()
File "/home/jkugler/.local/lib/python3.10/site-packages/questionary/prompts/text.py", line 90, in text
p = PromptSession(
File "/home/jkugler/.local/lib/python3.10/site-packages/prompt_toolkit/shortcuts/prompt.py", line 477, in __init__
self.app = self._create_application(editing_mode, erase_when_done)
File "/home/jkugler/.local/lib/python3.10/site-packages/prompt_toolkit/shortcuts/prompt.py", line 728, in _create_application
application: Application[_T] = Application(
File "/home/jkugler/.local/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 274, in __init__
self.input = input or session.input
File "/home/jkugler/.local/lib/python3.10/site-packages/prompt_toolkit/application/current.py", line 60, in input
self._input = create_input()
File "/home/jkugler/.local/lib/python3.10/site-packages/prompt_toolkit/input/defaults.py", line 52, in create_input
stdin.fileno()
AttributeError: 'FakeStdin' object has no attribute 'fileno'
If the fix is easy, cool. If it's going to cause large amounts of pain, don't worry about it. Activityjkugler commented on May 26, 2023 Works in Python 3.10 REPL
$ python3.10
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import questionary
>>> questionary.text("What's your name?",).ask()
? What's your name? Joshua
'Joshua'
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|