ODOO UnicodeDecodeError

UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe6 in position 2

解决这个问题的方法 不需要每个类里面都做替换的  只要把netsvc.py的文件里面加上这段代码就可以搞定了

default_encoding=’utf-8′
if sys.getdefaultencoding!=default_encoding:
reload(sys)
sys.setdefaultencoding(default_encoding)

————————————————————————————-
python 2.7.9
sudo su – postgres -c “createuser -s $USER”
sudo aptget install libsasl2dev
 sudo apt-get build-dep python-lxml
 pip2 install -r odoo/requirements.txt
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
./odoo.py –addons-path=addons,../mymodules –db-filter=mydb$
————————————————————————————-
 localhost:8069
Tell others about me!

Leave a Reply

Your email address will not be published. Required fields are marked *