GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 'FakeStdin' object has no attribute 'fileno' · Issue #989 · bpython/bpython

'FakeStdin' object has no attribute 'fileno' #989

New issue
Copy link
New issue
Copy link
Open
Open
'FakeStdin' object has no attribute 'fileno'#989
Copy link

Description

@jkugler
jkugler
opened on May 26, 2023
Issue body actions

I 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.

Reacted by Austin

Activity

  1. jkugler commented on May 26, 2023

    @jkugler
    jkugler
    on May 26, 2023
    Author
    More actions

    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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.