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

Unicode errors #5

Closed
marshalc opened this Issue May 24, 2012 · 1 comment

Comments

Projects
None yet
3 participants
@marshalc

marshalc commented May 24, 2012

I'm getting "UnicodeEncodeError" from chartit.

'ascii' codec can't encode character u'\u2013' in position 33: ordinal not in range(128)
Django Version: 1.4
Exception Type: UnicodeEncodeError
Exception Value:
'ascii' codec can't encode character u'\u2013' in position 33: ordinal not in range(128)
Exception Location: /lib/python2.6/site-packages/chartit/chartdata.py in _get_data, line 525
Python Version: 2.6.5

This specifically seems related to "lv = tuple(map(str, lv))", when "lv" contains an en-dash. I suspect I'll get even more of these errors on my data since I can't reasonably force all of my data into ASCII.

Hopefully you can check your code over for this and related issues. If I have the time, I'll try and fix this and send my solution on, but for now I'm forced to work around this.

@okainov

This comment has been minimized.

okainov commented Jun 9, 2016

Looks like fix is kinda simple: replace line 531 from chartdata.py
lv = tuple(map(str, lv))
to
lv = tuple(map(unicode, lv))

@okainov okainov referenced this issue Jun 9, 2016

Closed

Unicode errors #3

@atodorov atodorov added the important label Jul 30, 2016

@atodorov atodorov closed this in 8dac0f7 Aug 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment