-
Notifications
You must be signed in to change notification settings - Fork 235
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
Python2 crashes with non-ascii caracters. #7
Comments
Currently, though I haven't figured out how to work around that without escaping the ascii codec. Though you can use unicode('John’s Pizza').encode("unicode_escape") which will give out what we dont really want >>> John\u2019s Pizza So its better to avoid it. In case you were able to fix it, do share how you are able to. I'll be working on it in my free time to get it fixed. |
I have not tested it thoroughly, but it seems that removing the @@ -89,7 +89,7 @@ class InquirerControl(TokenListControl):
tokens.append((T.Selected if selected else T,
'- %s (%s)' % (choice[0], choice[2])))
else:
- tokens.append((T.Selected if selected else T, str(choice[0]),
+ tokens.append((T.Selected if selected else T, choice[0],
select_item))
tokens.append((T, '\n'))
Maybe this will guide you in the right direction even if it won't solve the issue yet. Thanos |
Oh lemme check that 👍 . Thanks |
Just ran into the same issue - would be great if we could merge that fix. |
I have added a fix to the |
So I am gonna close this issue. :+1 |
Sounds great, we want to use it as part of https://github.com/rasahq/rasa_core and since we still need to support py2 & py3 that would make this a lot easier 🚀 |
Nice one, 👍 . Thanks for your time |
Do you have any plans when the next release will happen? |
No, not anytime soon. Cos I am planning to add |
Yes that would be great, if you tag it with |
Hi,
When using PyInquirer with python2 I face a problem when the options include non-ascii characters.
Python3 works fine though.
Here is a minimal working example that demonstrates this behaviour.
Python3 execution:
Python2 execution:
The apostrophe unicode character is what is breaking the python2 execution.
The text was updated successfully, but these errors were encountered: