跳至内容
菜单
此问题已终结
5 回复
58963 查看

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';
\c 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';
\c template1
update pg_database set datallowconn = FALSE where datname = 'template0';

(press Ctrl-D to quit from psql)

 

 

形象
丢弃

Thanks it's worked for me.

最佳答案

Check this out. It helped me http://www.openerp.bg/%D0%B1%D0%BB%D0%BE%D0%B3/item/163-%D0%BF%D1%80%D0%BE%D0%BC%D1%8F%D0%BD%D0%B0-%D0%BD%D0%B0-postgresql-default-template0-%D0%BD%D0%B0-utf8-encoding

形象
丢弃

Above blog worked for me. Thank Tauras.

最佳答案

Check the following PR to documentation for odoo:

https://github.com/odoo/odoo/pull/18145/files

形象
丢弃
最佳答案

Hi,

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.

-Joaquin

形象
丢弃
相关帖文 回复 查看 活动
0
2月 25
692
2
11月 24
4699
2
10月 24
1924
2
8月 24
1179
3
7月 24
7436