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

habitica habits return non-decoded unicode bytestings on Python 3 #49

Open
asmfreak opened this issue Jul 3, 2017 · 1 comment
Open

Comments

@asmfreak
Copy link

asmfreak commented Jul 3, 2017

Now it looks like this:

habitica habits
[*****] 1 b'\xd0\x9f\xd1\x80\xd0\xbe\xd1\x85\xd0\xbe\xd0\xb4\xd0\xb8\xd1\x82\xd1\x8c \xd0\xbd\xd0\xb5 \xd0\xbc\xd0\xb5\xd0\xbd\xd0\xb5\xd0\xb5 10000 \xd1\x88\xd0\xb0\xd0\xb3\xd0\xbe\xd0\xb2'
[*****] 2 b'\xd0\x9d\xd0\xb5 \xd0\xb5\xd1\x81\xd1\x82\xd1\x8c \xd0\xbf\xd0\xbe \xd0\xbd\xd0\xbe\xd1\x87\xd0\xb0\xd0\xbc'
[****] 3 b'\xd0\x9f\xd0\xbb\xd0\xbe\xd0\xb4\xd0\xbe\xd1\x82\xd0\xb2\xd0\xbe\xd1\x80\xd0\xbd\xd0\xb0\xd1\x8f \xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x82\xd0\xb0 (\xd0\xbd\xd0\xb0\xd0\xb6\xd0\xbc\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb7\xd0\xbd\xd0\xb0\xd1\x87\xd0\xbe\xd0\xba \xd0\xba\xd0\xb0\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0\xd1\x88\xd0\xb0 \xd0\xb4\xd0\xbb\xd1\x8f \xd0\xbf\xd1\x80\xd0\xb0\xd0\xb2\xd0\xba\xd0\xb8)'
[****] 4 b'\xd0\x9d\xd0\xb5\xd0\xb7\xd0\xb4\xd0\xbe\xd1\x80\xd0\xbe\xd0\xb2\xd0\xbe\xd0\xb5 \xd0\xbf\xd0\xb8\xd1\x82\xd0\xb0\xd0\xbd\xd0\xb8\xd0\xb5 (\xd0\xbd\xd0\xb0\xd0\xb6\xd0\xbc\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb7\xd0\xbd\xd0\xb0\xd1\x87\xd0\xbe\xd0\xba \xd0\xba\xd0\xb0\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0\xd1\x88\xd0\xb0 \xd0\xb4\xd0\xbb\xd1\x8f \xd0\xbf\xd1\x80\xd0\xb0\xd0\xb2\xd0\xba\xd0\xb8)'
[****] 5 b'\xd0\x92\xd0\xbe\xd1\x81\xd0\xbf\xd0\xbe\xd0\xbb\xd1\x8c\xd0\xb7\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x82\xd1\x8c\xd1\x81\xd1\x8f \xd0\xbb\xd0\xb5\xd1\x81\xd1\x82\xd0\xbd\xd0\xb8\xd1\x86\xd0\xb5\xd0\xb9/\xd0\xbb\xd0\xb8\xd1\x84\xd1\x82\xd0\xbe\xd0\xbc (\xd0\xbd\xd0\xb0\xd0\xb6\xd0\xbc\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb7\xd0\xbd\xd0\xb0\xd1\x87\xd0\xbe\xd0\xba \xd0\xba\xd0\xb0\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0\xd1\x88\xd0\xb0 \xd0\xb4\xd0\xbb\xd1\x8f \xd0\xbf\xd1\x80\xd0\xb0\xd0\xb2\xd0\xba\xd0\xb8)'

Whereas it should output something like this:

habitica habits
[*****] 1 Проходить не менее 10000 шагов
[*****] 2 Не есть по ночам
[****] 3 Плодотворная работа (нажмите значок карандаша для правки)
[****] 4 Нездоровое питание (нажмите значок карандаша для правки)
[****] 5 Воспользоваться лестницей/лифтом (нажмите значок карандаша для правки)

It could be solved, I think, using one .decode("utf-8").
Other functions (dailies and todos) aren't affected by this bug.

@asmfreak
Copy link
Author

asmfreak commented Jul 3, 2017

Also with making daily as done:

marked daily 'b'\xd0\x9f\xd1\x80\xd0\xbe\xd1\x85\xd0\xbe\xd0\xb4\xd0\xb8\xd1\x82\xd1\x8c \xd0\xbd\xd0\xb5 \xd0\xbc\xd0\xb5\xd0\xbd\xd0\xb5\xd0\xb5 5000 \xd1\x88\xd0\xb0\xd0\xb3\xd0\xbe\xd0\xb2'' completed

@johnnyasantoss johnnyasantoss mentioned this issue Sep 8, 2017
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

1 participant