Odoo Help

0

Error From openerp 7 installation on cent os

By
Odoo
on 8/11/14, 5:55 AM 1,011 views

Hi all ,

When I install openerp 7 inn cent os 5 it gets this error please help,,,,,,,,,,

 

2014-08-11 09:53:25,409 14188 ERROR ? openerp.sql_db: bad query: CREATE DATABASE "erp_demo" ENCODING 'unicode' TEMPLATE "template1"
Traceback (most recent call last):
  File "/opt/openerp/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.

2014-08-11 09:53:25,410 14188 ERROR ? openerp.netsvc: 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.
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch
    return fn(*params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 167, in exp_create_database
    self._create_empty_database(db_name)
  File "/opt/openerp/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/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/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.

2014-08-11 09:53:25,415 14188 INFO ? werkzeug: 117.247.184.138 - - [11/Aug/2014 09:53:25] "POST /web/database/create HTTP/1.1" 200 -

0
Marvin Taboada
On 8/11/14, 5:02 PM

Hello Libu Koshy,

There is a configuration parameter "db_template" ("--db-template" from the command-line) that defaults to "template1" for the database template to use. See the following link for the related code: https://github.com/odoo/odoo/blob/7.0/openerp/tools/config.py#L229

Use "template0" to give it a try as suggested in the error message. If that fails, verify your PostgreSQL installation and ensure it supports UTF8 as encoding before proceeding with the installation.

You can also create new database templates with the desired encoding and then use it, take a look to the following page for an authoritative reference: http://www.postgresql.org/docs/9.0/static/manage-ag-templatedbs.html

Just as a side note, there are procedures to "change" the encoding of template databases, but mainly they consist in turning off the "database is template" flag (so we can remove it), remove the database, and create it again with the desired encoding (provided the encoding is supported in your installation). If you are testing this in your development machine, go ahead, if not ask your DB-admin or anyone that should approve this before. Here is a link with minimal steps: https://coderwall.com/p/j-_mia

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

Question tools

1 follower(s)

Stats

Asked: 8/11/14, 5:55 AM
Seen: 1011 times
Last updated: 8/12/15, 10:54 AM