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

Report fails when localized date contains non-ASCII characters (e.g. Février) #239

Closed
jgribonvald opened this issue May 21, 2015 · 3 comments
Assignees
Labels

Comments

@jgribonvald
Copy link

I'm having problems to generate a report for "Février" (February) month, and I'm having the same problem for any day on this month. Do you think that can be due to french month name with accents ?

Any help to resolve for this bug would be appreciated.

Thanks

@nchachereau
Copy link

Do you think that can be due to french month name with accents ?

Unfortunately, yes, it does. (hamster export 2015-02-01 2015-02-28 will show you the error). Unicode was difficult to handle in Python2, and Hamster does not do it very well. (See also #153).

I have started looking into this. In the meantime, if this is urgent, you could try doing the same as pull request #218 : adding the following lines near the start of reports.py

reload(sys)
sys.setdefaultencoding("utf-8")

@nchachereau nchachereau self-assigned this May 22, 2015
@nchachereau nchachereau changed the title Report problems for all days of a specfic month Report problems for all days of a specific month May 22, 2015
@nchachereau nchachereau changed the title Report problems for all days of a specific month Report fails when localized date contains non-ASCII characters (e.g. Février) May 22, 2015
@jgribonvald
Copy link
Author

Thanks, #218 is solving the problem !

ederag added a commit to ederag/hamster that referenced this issue Aug 22, 2018
Hopefully, fix utf-8 related issues projecthamster#153, projecthamster#239, projecthamster#317

Co-authored-by: Nikita Kazeev
Thanks for showing the way in PR projecthamster#174 !
@ederag
Copy link
Collaborator

ederag commented Nov 30, 2018

Thanks a lot.
This utf-8 issue has hopefully been fixed by the python3 migration.

@ederag ederag closed this as completed Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants