On Oct 03, Vitaly Pashkov <ad...@fluda.net> wrote: > Hi all!
Hi! First of all, thank you for the excellent bug report. > $ imdbpy2sql.py -d ./ -u postgres://login:passw...@localhost/imdb [...] > psycopg2.DataError: неверная последовательность байт имя кодировки > "UTF8": 0xc333 > HINT: This error can also happen if the byte sequence does not > match the encoding expected by the server, which is controlled by > "client_encoding". > > The text at the "psycopg2.DataError:" says "invalid byte sequence > for encoding "/UTF8/"" Unfortunately I'm unable to reproduce the problem. :-( I've more or less recreated your environment: - latest plain text data files (your same titles are shown). - no cutils.so and no lxml. - postgresql 8.4 (but I don't think this is a problem) on a Debian unstable system. - python-psycopg2 2.0.12. It goes without saying that my system is set to Italian; the script goes on after flushing the first batch of titles without any problem. While I can't exclude a programming error on my side (I'm a bit scared by the 0xc333 unicode code: try 'print unichr(0xc333)' - it's not exactly the kind of chars that are expected in movies.list...), right now I'm more prone to think this is a configuration issue on your system. Some questions and tests you can try: 1. Did it ever worked on your system (with an old set of data, for example)? 2. Have you tried to change the value of client_encoding in postgresql.conf? 3. Maybe you can try running the imdbpy2sql.py script with this extra argument: -e 'AFTER_CREATE:SET client_encoding TO utf8' (notice that I'm not sure that "utf8" is valid, for PostgreSQL). Right now, I'm out of ideas; I hope this can help you debugging the problem. Bye! -- Davide Alberani <davide.alber...@gmail.com> [GPG KeyID: 0x465BFD47] http://erlug.linux.it/~da/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help