[ORM and Clients] Error message for imported db when update.

Bug #558477 reported by Nhomar - Vauxoo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

When you import a DB, and the db imported is in other encoding diferent to UTF8 this error appear.

[2010-04-08 11:40:32,392] INFO:init:module base: loading ir/ir.xml
No LSB modules are available.
[2010-04-08 11:40:35,150] ERROR:init:[01]:
[2010-04-08 11:40:35,150] ERROR:init:[02]: Environment Information :
[2010-04-08 11:40:35,151] ERROR:init:[03]: System : Linux-2.6.24-24-server-i686-with-debian-lenny-sid
[2010-04-08 11:40:35,151] ERROR:init:[04]: OS Name : posix
[2010-04-08 11:40:35,151] ERROR:init:[05]: Distributor ID: Ubuntu
[2010-04-08 11:40:35,152] ERROR:init:[06]: Description: Ubuntu 8.04.4 LTS
[2010-04-08 11:40:35,152] ERROR:init:[07]: Release: 8.04
[2010-04-08 11:40:35,152] ERROR:init:[08]: Codename: hardy
[2010-04-08 11:40:35,152] ERROR:init:[09]: Operating System Release : 2.6.24-24-server
[2010-04-08 11:40:35,153] ERROR:init:[10]: Operating System Version : #1 SMP Fri Sep 18 17:24:10 UTC 2009
[2010-04-08 11:40:35,153] ERROR:init:[11]: Operating System Architecture : 32bit
[2010-04-08 11:40:35,153] ERROR:init:[12]: Operating System Locale : en_US.UTF8
[2010-04-08 11:40:35,154] ERROR:init:[13]: Python Version : 2.5.2
[2010-04-08 11:40:35,154] ERROR:init:[14]: OpenERP-Server Version : 5.0.9
[2010-04-08 11:40:35,154] ERROR:init:[15]: Last revision No. & ID : 2032 <email address hidden>
[2010-04-08 11:40:35,155] ERROR:init:[16]:
[2010-04-08 11:40:35,155] ERROR:init:[17]: <record id="property_rule" model="ir.rule">
[2010-04-08 11:40:35,155] ERROR:init:[18]: <field model="ir.model.fields" name="field_id" search="[('model', '=', 'ir.property'), ('name', '=', 'company_id')]"/>
[2010-04-08 11:40:35,155] ERROR:init:[19]: <field name="operator">child_of</field>
[2010-04-08 11:40:35,156] ERROR:init:[20]: <field name="operand">user.company_id.id</field>
[2010-04-08 11:40:35,156] ERROR:init:[21]: <field name="rule_group" ref="property_rule_group"/>
[2010-04-08 11:40:35,156] ERROR:init:[22]: </record>
Traceback (most recent call last):
  File "./openerp-server.py", line 99, in <module>
    pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update'])
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/pooler.py", line 40, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/addons/__init__.py", line 700, in load_modules
    has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/addons/__init__.py", line 631, in load_module_graph
    tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/tools/convert.py", line 874, in convert_xml_import
    obj.parse(doc.getroot())
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/tools/convert.py", line 771, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/tools/convert.py", line 743, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode )
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/addons/base/ir/ir_model.py", line 488, in _update
    model_obj.write(cr, uid, [res_id], values, context=context)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/osv/orm.py", line 2580, in write
    self, cr, user, context=context)):
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/addons/base/ir/ir_rule.py", line 84, in _operand
    recur=['many2one'], root_tech='user', root='User')
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/addons/base/ir/ir_rule.py", line 59, in get
    fields = self.pool.get(object).fields_get(cr,uid)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/osv/orm.py", line 2195, in fields_get
    return super(orm, self).fields_get(cr, user, fields, context, read_access)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/osv/orm.py", line 1007, in fields_get
    user, context)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/addons/base/res/res_user.py", line 100, in _lang_get
    res = obj.read(cr, uid, ids, ['code', 'name'], context)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/osv/orm.py", line 2206, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/nhomar/openerp/stable/5.0/instancias/netquatro/server/bin/osv/orm.py", line 2278, in _read_flat
    res.extend(cr.dictfetchall())
  File "/usr/lib/python2.5/site-packages/psycopg2/psycopg1.py", line 83, in dictfetchall
    rows = _2cursor.fetchall(self)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)

IMHO, the first step when you import a DB to a fresh instalation you check the permisions seeing in first place if the client list the empty db created.
I think this error is not documented enough on framework, when the databases are listed by the clients the Enoding _must_ be checked, not listed in clients and a WARNING: message showed on logs.

The main reason is that, debug this human error in the creation of the db take a lot of time in debuging time.

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Nhomar Hernández ,

  Would you please provide me the exact steps that you followed to generate this error?

Thanks.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Currently We are only supporting utf-8 only.

Thanks.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Wishlist
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.