[6.0RC1] IndexError: list index out of range

Bug #680326 reported by OpenBMS JSC
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
High
OpenERP's Framework R&D

Bug Description

Cannot create a new DB with revno: 3032

[2010-11-23 08:05:10,157][hotel] INFO:init:[01]: Assertions report:
[2010-11-23 08:05:10,157][hotel] INFO:init:[02]: Level success failed
[2010-11-23 08:05:10,157][hotel] INFO:init:[03]: error 1 0
[2010-11-23 08:05:10,157][hotel] INFO:init:[04]: total 1 0
[2010-11-23 08:05:10,157][hotel] INFO:init:[05]: end of report (1 assertion(s) checked)
[2010-11-23 08:05:10,169][hotel] INFO:i18n:module base: loading translation file for language vi
[2010-11-23 08:05:30,658][hotel] ERROR:web-services:[01]: CREATE DATABASE
[2010-11-23 08:05:30,658][hotel] ERROR:web-services:[02]: Traceback (most recent call last):
[2010-11-23 08:05:30,658][hotel] ERROR:web-services:[03]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/web_services.py", line 106, in __call__
[2010-11-23 08:05:30,659][hotel] ERROR:web-services:[04]: modobj.update_translations(cr, 1, mids, lang)
[2010-11-23 08:05:30,659][hotel] ERROR:web-services:[05]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/addons/base/module/module.py", line 471, in update_translations
[2010-11-23 08:05:30,659][hotel] ERROR:web-services:[06]: tools.trans_load(cr.dbname, f, lang, verbose=False, context=context)
[2010-11-23 08:05:30,660][hotel] ERROR:web-services:[07]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/translate.py", line 758, in trans_load
[2010-11-23 08:05:30,660][hotel] ERROR:web-services:[08]: r = trans_load_data(db_name, fileobj, fileformat, lang, strict=strict, verbose=verbose, context=context)
[2010-11-23 08:05:30,660][hotel] ERROR:web-services:[09]: File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/tools/translate.py", line 857, in trans_load_data
[2010-11-23 08:05:30,661][hotel] ERROR:web-services:[10]: ('name', '=', dic['res_id'].split('.', 1)[1]),
[2010-11-23 08:05:30,661][hotel] ERROR:web-services:[11]: IndexError: list index out of range
[2010-11-23 08:05:31,133][?] DEBUG:web-services:netrpc: rpc-dispatching exception
Traceback (most recent call last):
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/service/netrpc_server.py", line 70, in run
    result = self.dispatch(msg[0], msg[1], msg[2:])
  File "/home/phongnt/Documents/Projects/openerp-trunk/server/bin/netsvc.py", line 499, in dispatch
    raise OpenERPDispatcherException(e, tb_s)
OpenERPDispatcherException

phongnt@phongnt-laptop:~/Documents/Projects/openerp-trunk/server$ bzr log -l 1 -v
------------------------------------------------------------
revno: 3032
committer: Launchpad Translations on behalf of openerp
branch nick: openobject-server
timestamp: Mon 2010-11-22 04:49:56 +0000
message:
  Launchpad automatic translations update.
modified:
  bin/addons/base/i18n/af.po
  bin/addons/base/i18n/pl.po

Revision history for this message
Azazahmed Saiyed (OpenERP) (saz-openerp) wrote :

Hello,

If you add any extra-addons module to trunk-addons that would not be compatible with the latest trunk version. I have created a new db successfully with revno: 3032 at my end. So please try again with the list of only trunk-addons modules. If you still get the same error then let us know about it.

Thanks.

Changed in openobject-server:
status: New → Invalid
Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

Indeed I have links in extra-addons. How do I identify the incompatible modules and provide fix? I need some modules in extra-addons for operations.

Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote : Re: [Bug 680326] Re: IndexError: list index out of range

On Tuesday 23 November 2010, you wrote:
> Indeed I have links in extra-addons. How do I identify the incompatible
> modules and provide fix? I need some modules in extra-addons for
> operations.

I'm afraid it is not about having "addons" or "extra-addons" in your paths.

The backtrace you sent suggests that somewhere in the po files you are trying
to import there is an incomplete "res_id:" comment like:

# res_id:id_without_module

With current code, all "res_id" references have to be in the "module.xml_id"
format, with a dot.

Please examine those po files you have, and if they are not your fault
(=changed by you), please report back to us to fix them.

--
Say NO to spam and viruses. Stop using Microsoft Windows!

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote : Re: IndexError: list index out of range
Download full text (6.5 KiB)

Hello,

I've checked the vi.po files with msgfmt, and everything seems ok, but the error prevails. Please advise!

phongnt@phongnt-laptop:~/Documents/Projects/openerp-trunk$ find * -iname '*vi*.po' -exec msgfmt -c {} \; 2>&1 | tee /tmp/msgfmt.log
addons/l10n_uk/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/l10n_ch/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/base_module_record/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/idea/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/account_voucher/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/mrp_jit/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/hr_contract/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/crm/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/l10n_fr/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/hr_holidays/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/project/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/account_tax_include/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/report_intrastat/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/base_report_designer/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/auction/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/hr_timesheet_sheet/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/purchase_analytic_plans/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/mrp/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/crm_profiling/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/account_followup/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/sale_crm/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/base_iban/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/subscription/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/point_of_sale/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/event_project/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/base_setup/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/mrp_repair/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/project_gtd/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/account_payment/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/stock_no_autopicking/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/warning/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/l10n_be/i18n/vi.po:7: field `Last-Translator' still has initial default value
addons/base_module_quality/i18n/vi.po:7: field `Last-Translator' still has initial defaul...

Read more...

Revision history for this message
xrg (xrg) wrote : Re: [Bug 680326] Re: IndexError: list index out of range

On Tuesday 23 November 2010, you wrote:
> Hello,
>
> I've checked the vi.po files with msgfmt, and everything seems ok, but
> the error prevails. Please advise!

The issue of res_id is Openerp - specific , it wouldn't show up in msgfmt.

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote : Re: IndexError: list index out of range

Is there anyway that I can enable a more detailed trace to identify which file is being read when error happens?

Changed in openobject-server:
status: Invalid → Confirmed
importance: Undecided → High
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

This error also happens when loading vi_VN after an initial DB creation (without configuration steps)

Environment Information :
System : Linux-2.6.32-26-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-26-generic
Operating System Version : #47-Ubuntu SMP Wed Nov 17 15:58:05 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : en_AU.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1696 launchpad_translations_on_behalf_of_openerp-20101125045234-dzsxzv005sfk59ze
Traceback (most recent call last):
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/addons/base/module/wizard/base_language_install.py", line 49, in lang_install
    modobj.update_translations(cr, uid, mids, lang, context or {})
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/addons/base/module/module.py", line 471, in update_translations
    tools.trans_load(cr.dbname, f, lang, verbose=False, context=context)
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/tools/translate.py", line 729, in trans_load
    else:
  File "/var/local/software/openerp-v6.0dev/openobject-server/bin/tools/translate.py", line 828, in trans_load_data
    elif fileformat == 'po':
IndexError: list index out of range

summary: - IndexError: list index out of range
+ [6.0RC1] IndexError: list index out of range
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

I can't update my database nor create a new one.

xrg (xrg)
Changed in openobject-server:
status: Confirmed → In Progress
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello,
This issue is caused by invalid PO files, and a fix has been merged in revision 3042 <email address hidden>
Thanks for reporting!

Changed in openobject-server:
milestone: none → 6.0-rc2
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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