Unicode

16 views
Skip to first unread message

Geoff Wright

unread,
Feb 27, 2016, 9:48:35 PM2/27/16
to piecash
The piecash_ledger.py script throws me the following error using 2.7.10 on Mac OSX.

File "/usr/local/lib/python2.7/site-packages/piecash/ledger.py", line 57, in ledger
res = "account {}\n" .format(acc.fullname, )
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 19: ordinal not in range(128)

Following advice to a related question from Stackoverflow, I added ...

from __future__ import unicode_literals

... to ledger.py but just wondering if anybody could comment on whether this is the best approach. Thanks!

Sébastien de Menten

unread,
Feb 28, 2016, 12:58:36 AM2/28/16
to Geoff Wright, piecash

That is a good fix indeed.
If you have already used github.com (or want to learn), you can do a pull request (PR) with this bug fix.

--
You received this message because you are subscribed to the Google Groups "piecash" group.
To unsubscribe from this group and stop receiving emails from it, send an email to piecash+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/piecash/216a9bb9-e7d8-4bff-a9b7-fc699e77acc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages