Odoo Help


Unicode error only at reboot

Franco A.
on 2/4/15, 11:04 AM 836 views


I have Odoo installed from github on an Ubuntu 14.04 machine. Odoo starts at boot with a script that I copied from the /debian/init file.

I built a custom module that reads file names from a directory on the server and lists them. I checked all possible unicode naming problems there, I hope.

My problem is that when I first boot the machine, log into Odoo and go to where my module should display file names I get an error "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)"

That character is a non ascii one.

The strange thing is that if I stop odoo and then restart it the problem goes away and file names get read correctly.

Any help?



Franco A.
On 2/5/15, 6:38 AM

Solved by myself by adding a definition of the LANG variable to the init script:

case "${1}" in
                echo -n "Starting ${DESC}: "

                LANG="it_IT.UTF-8" start-stop-daemon --start --quiet --pidfile ${PIDFILE} \     ##!! Here I define a utf-8 locale
                        --chuid ${USER} --background --make-pidfile \
                        --exec ${DAEMON} -- ${DAEMON_OPTS}

                echo "${NAME}."


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/4/15, 11:04 AM
Seen: 836 times
Last updated: 3/16/15, 8:10 AM