You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have issues when entering some characters e.g. into in Input. These characters are not only german umlaute like "ä, ü, ö" but also shift, arrow-up and some more. The error is:
Input two letters: Traceback (most recent call last):
File "test.py", line 9, in <module>
prompt()
File "test.py", line 6, in prompt
var_two_letters = two_letters.launch()
File "/home/administrator/.local/lib/python3.6/site-packages/bullet/client.py", line 444, in launch
if self.valid(result):
File "/home/administrator/.local/lib/python3.6/site-packages/bullet/client.py", line 417, in valid
if not bool(re.match(self.pattern, ans)):
File "/usr/lib/python3.6/re.py", line 172, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object
Minimal code to reproduce ist:
from bullet import Input
two_letters = Input(prompt = "Input two letters: ", pattern="^[A-Z]{2}$")
def prompt():
var_two_letters = two_letters.launch()
print(var_two_letters)
prompt()
Actually, I dont even want to enter such characters, as you can see that the regex in the pattern only accepts plain characters. However, the script crashes when I just type in the character, so there is no way for me to sanitize the input before the crash.
Is there anything I can do about this? I tried the native "input" function of pything and here I can add Umlaute.
The text was updated successfully, but these errors were encountered:
I have issues when entering some characters e.g. into in Input. These characters are not only german umlaute like "ä, ü, ö" but also shift, arrow-up and some more. The error is:
Minimal code to reproduce ist:
Actually, I dont even want to enter such characters, as you can see that the regex in the pattern only accepts plain characters. However, the script crashes when I just type in the character, so there is no way for me to sanitize the input before the crash.
Is there anything I can do about this? I tried the native "input" function of pything and here I can add Umlaute.
The text was updated successfully, but these errors were encountered: