bullet icon indicating copy to clipboard operation
bullet copied to clipboard

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

Open lxylxy123456 opened this issue 2 years ago • 0 comments

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

lxylxy123456 avatar Jun 13 '22 19:06 lxylxy123456