dedupeio / dedupe-examples

:id: Examples for using the dedupe library
MIT License
404 stars 216 forks source link

mysql_example.py: ValueError: Currency formatting is not possible using the 'C' locale. #43

Closed skabbit closed 7 years ago

skabbit commented 8 years ago

There is some strange bug in the payoff section:

Traceback (most recent call last):
  File "mysql_example.py", line 434, in <module>
    row['totals'] = locale.currency(row['totals'], grouping=True)
  File "/Users/skabbit/venv/venv/lib/python2.7/locale.py", line 264, in currency
    raise ValueError("Currency formatting is not possible using "
ValueError: Currency formatting is not possible using the 'C' locale.

Setting locale in ENV doing nothing, because of this line: locale.setlocale(locale.LC_ALL, '') # for pretty printing numbers

fgregg commented 7 years ago

you need to set the LANG variable

like export LANG=en_US.UTF-8