On Wed, 17 Jun 2009, KU Kam-ming wrote:
> query = query.encode(charset)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 61:
> ordinal not in range(128)
>
> It seems that it cannot index a record with invalid 'code' , how can I
> determine which record and delete it!?
Please use the verbose option of bibindex:
$ bibindex -v 9 [...]
Otherwise here are some checklist ideas: what are your versions of CDS
Invenio, MySQL, and MySQLdb? Is your MySQLdb version at least 1.2.1_p2
as recommended in the INSTALL file? Are your MySQL tables defined with
DEFAULT CHARACTER SET utf8? Can you send us the output of ``inveniocfg
--detect-system-details''? For example, here is an output from a SLC5
(aka RHEL5) box:
$ /opt/cds-invenio/bin/inveniocfg --detect-system-details
>>> Going to detect system details...
* Hostname: foo.bar.com
* Invenio version: 0.99.1.20090602
* Python version: 2.4.3 (#1, Jan 22 2009, 20:23:44) [GCC 4.1.2 20071124 (Red
Hat 4.1.2-42)]
* Apache version: Apache/2.2.3 (Red Hat) (Release 22.el5) [/usr/sbin/httpd];
Apache/2.2.3 (Red Hat) (Release 22.el5)
[/usr/sbin/httpd.event];
Apache/2.2.3 (Red Hat) (Release 22.el5)
[/usr/sbin/httpd.worker]
* mod_python version: 3.3.1
* MySQLdb version: 1.2.2
* MySQL version:
- version: 5.0.45-log
- character_set_client: utf8
- character_set_connection: utf8
- character_set_database: utf8
- character_set_results: utf8
- character_set_server: latin1
- character_set_system: utf8
- collation_connection: utf8_general_ci
- collation_database: utf8_general_ci
- collation_server: latin1_swedish_ci
>>> System details detected successfully.
Best regards
--
Tibor Simko ** CERN Document Server ** <http://cds.cern.ch/>