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
UnicodeEncodeError while pressing a ListItemButton #3078
Comments
The error can be replicate with this simple modified kivy example: |
@alexkiro Your pastebin example needs fixing. Can you make it runnable ? I get multiple python syntax errors. |
Works fine for me :/
|
Should not work though. What I did to fix it is add
at the top of your script. Then remove u"_______" before "chérie" and "Middle-{0}" Aside from this it works for me on Windows with 1.8.0. No problem clicking a list item. Should be closed. |
It should work just fine without the shebang if you pass it trough python yourself.
This was just a simple example to replicate the issue. I received the data I want to present in the list as unicode. Removing the I can encode the data before setting it to the ListItemButton, but the button should be able to handle unicode strings just fine. For example the documentation for Label states that (http://kivy.org/docs/api-kivy.uix.label.html). I still believe this is an issue that requires fixing. Or at least clean-up what kind of string does the Widget accept. |
What I am saying is if you wish the issue to be fixed, provide a better example. As such I am not able to reproduce it, without modifying your pastebin. Secondly, there was a lot of work done to fix unicode issues in the dev version (1.9.0). I would like to investigate this further but your example isn't clear enough for me at this point. It would make things easier for everyone if you reworked it, so we can test on stable / dev and other platforms to confirm if there is an issue or if it's solved by 1.9.0-dev implementation. |
Hmm, sorry, I'm still not sure what is not clear here :( I'll install the dev version and checked if this has been already fixed. The traceback also point to this part of the code (in kivy.lang):
This suggests that the issue only occurs when
|
Update, this has been indeed fixed in the latest dev version:
|
While having an unicode character in a ListItemButton's text is working ok, the application crashes when the button is pressed:
Kivy version:
The text was updated successfully, but these errors were encountered: