コンテンツへスキップ
メニュー
この質問にフラグが付けられました
5 返信
59256 ビュー

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
812
2
11月 24
4949
2
10月 24
2098
2
8月 24
1321
3
7月 24
7607