Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
Hi u all!
I'm trying to install openerp in a server which is running a mysql DB.
When I'm installing it, it appears a list of errors and i supose it's because of my existing DB. Can i do something to fix it or cannot i use my existing DB?
OpenERP Server Error
Traceback (most recent call last): File "/opt/openerp/v7/web/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/opt/openerp/v7/web/addons/web/controllers/main.py", line 774, in create params['create_admin_pwd']) File "/opt/openerp/v7/web/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/opt/openerp/v7/web/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last): File "/opt/openerp/v7/web/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/v7/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 122, in dispatch return fn(params) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 167, in exp_create_database self._create_empty_database(db_name) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 136, in _create_empty_database cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "%s" """ % (name, chosen_template)) File "/opt/openerp/v7/server/openerp/sql_db.py", line 161, in wrapper return f(self, *args, *kwargs) File "/opt/openerp/v7/server/openerp/sql_db.py", line 226, in execute res = self._obj.execute(query, params) DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template.
Thank you very much
I copy-paste solution from Tauras link.
In console run psql:
sudo -u postgres psql postgres
then in psql console execute sequence of commands:
update pg_database set datallowconn = TRUE where datname = 'template0';
update pg_database set datistemplate = FALSE where datname = 'template1';
drop database template1;
create database template1 with template = template0 encoding = 'UTF8';
update pg_database set datistemplate = TRUE where datname = 'template1';
update pg_database set datallowconn = FALSE where datname = 'template0';
(press Ctrl-D to quit from psql)
Thanks for the post this solution.
But, what's the origin of this problem?
I've reviewed into odoo code and they use postgresql template1 for createdb porpuse.
Then, is it a bug of odoo? or is a misconfiguration introduced by system's locale? or is a postgresql default configuration?
I'll appreciate your response.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/14/14, 5:49 AM|
|Seen: 20295 times|
|Last updated: 12/30/16, 2:38 PM|