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

Input with strip=True will error when user presses the down arrow #85

Open
lxylxy123456 opened this issue Jun 13, 2022 · 1 comment
Open

Comments

@lxylxy123456
Copy link

I am working on MacOS. I have installed bullet 2.2.0 using pip.
When I running the following code, and press the down arrow,

from bullet import Input
cli = Input('Press down arrow: ', strip=True)
result = cli.launch()

I see error:

% python3 /tmp/a.py
Press down arrow: Traceback (most recent call last):
  File "/tmp/a.py", line 3, in <module>
    result = cli.launch()
  File "/usr/local/lib/python3.9/site-packages/bullet/client.py", line 458, in launch
    return result.strip() if self.strip else result
AttributeError: 'NoneType' object has no attribute 'strip'
% 

This error does not happen when strip=False

@danner26
Copy link

Hello, my colleague and I use this codebase pretty often in our projects but the original and all forks seem to be stale. We have thus forked into our own project, BulletPrompt.

I have taken the liberty to fix this issue, which will be available in the next release.

PR with fix: danner26#11
Release Version: v2.2.2

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