codegooglecom / mysql-log-filter

Automatically exported from code.google.com/p/mysql-log-filter
1 stars 0 forks source link

Error setting locale on chinese (non-Windows) system #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
{{{
 python mysql-log-filter-1.9/mysql_filter_slow_log.py --no-duplicates
--sort-execution-count --top=30 --incremental slow-queries.20080614 >
result.txt
Traceback (most recent call last):
  File "mysql_filter_slow_log.py", line 151, in <module>
    os.name == 'nt' and 'en' or 'en_US.ISO8859-1')
  File "/usr/lib/python2.5/locale.py", line 478, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
}}}

locale
{{{
LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
}}}

Original issue reported on code.google.com by liuyuan...@gmail.com on 14 Jun 2008 at 5:20

GoogleCodeExporter commented 8 years ago
Thanks for your report, are you using a chinese non-Windows system, for example 
Linux?

Please find the fix attached.

Original comment by rene.leonhardt@gmail.com on 15 Jun 2008 at 2:53

Attachments:

GoogleCodeExporter commented 8 years ago
rene.leonhardt:
the version you attached still not work. error message as below:

--------------------------------------------------------

Traceback (most recent call last):
  File "mysql_filter_slow_log.py", line 369, in <module>
    include_hosts = array_unique(include_hosts)
NameError: name 'array_unique' is not defined

Original comment by liuyuan...@gmail.com on 17 Jun 2008 at 12:49

GoogleCodeExporter commented 8 years ago
Please find the file including array_unique() attached.

Original comment by rene.leonhardt@gmail.com on 17 Jun 2008 at 5:35

Attachments: