Crashes on update with the latest revision. Assertion Error refers to uninstalled module...

Bug #1255175 reported by Erdem (7Gates.co)
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 3

Bug Description

I have updated all for the latest revisions.
Addons revno: 9646
Server revno: 5150
Web revno: 4079

Got the below error on running update... update cancelled..

ERROR xxxxx openerp.tools.convert: Parse error in /usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/project_mrp/process/project_mrp_process.xml:56:
<record id="sale_stock.process_node_saleprocurement0" model="process.node">
            <field name="menu_id" ref="procurement.menu_stock_procurement_action"/>
            <field name="model_id" ref="procurement.model_procurement_order"/>
            <field name="kind">subflow</field>
            <field name="name">Procurement</field>
            <field name="subflow_id" ref="procurement.process_process_procurementprocess0"/>
            <field name="process_id" ref="sale.process_process_salesprocess0"/>
            <field name="model_states">object.state=='confirmed'</field>
            <field name="flow_start" eval="1"/>
        </record>
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/openerp/tools/convert.py", line 742, in _tag_record
    self._test_xml_id(rec_id)
  File "/opt/openerp/server/openerp/tools/convert.py", line 256, in _test_xml_id
    assert modcnt == 1, """The ID "%s" refers to an uninstalled module""" % (xml_id,)
AssertionError: The ID "sale_stock.process_node_saleprocurement0" refers to an uninstalled module

description: updated
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

I have checked this issue with my updated db, but I am not getting any error. So, Would you please provide proper steps to reproduce it?

Waiting for your answer,
Thanks,

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Erdem (7Gates.co) (uneye) wrote :

We have an install base with from launchpad directly. We haven't been updated the server for a while. Then we have pulled all of them from launchpad and updated to the current revisions.

We have run below command..

./openerp-server --addons-path=blah,blah,blah --stop-after-init -u all -d DB

We have three DBs on this server and two of them updated just fine.

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

Thanks for your answer ..!!

I have ran your above command but still its working fine for us. None of my DBs have this issue and they updated fine.

So, Currently I am closing this issue . But If in future If you again have this issue then you can reopen it.

Regards,

Changed in openobject-addons:
status: Incomplete → Invalid
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Oops..!! Sorry , I just forgot to install project_mrp module. I just install it and uninstall sale_stock module. And then tried to updated it having the same error as yours.

But , I think you manually uninstall sale_stock module, so, please install sale_stock module again and then try to update it. It will definitely work.

Thanks,

Revision history for this message
Erdem (7Gates.co) (uneye) wrote :

Thank you realizing that I was about to list all the modules and cross check with our modules.

I have tried that already. Can't log back in and can't install via command line. Same error.

./openerp-server --addons-path=blah -i sale_stock -d DB

exact same error..

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

facing same issue as yours ,going to confirm it.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: Invalid → Confirmed
Revision history for this message
Erdem (7Gates.co) (uneye) wrote :

anything on the solution? I may need to export and import all the data to a new DB in order to use it.. This was our main DB.

Revision history for this message
Alex Duan (duanyp91) wrote :

same happens to me . Does anyone have a clue to install module through command line or roll back ? Thanks!

Revision history for this message
Erdem (7Gates.co) (uneye) wrote :

Alex to install you just write below command but in this case it doesn't work either.

Just change the <> parts with the appropriate replacements.. And as far as I know there is no uninstall from the command line, which is surprising..

<path-to-openerp>/openerp-server --addons-path=<addons-path-comma-separated> -i <short-name-of-module-you-want-to-install> -d <name-of-then-database-you-want-to-install-to>

Revision history for this message
Alex Duan (duanyp91) wrote :

@Erdem @Twinkle Christian, I think I find the way to solve this error.

The module has another state: "to upgrade"
I edited function(_test_xml_id) in the file: openerp/tools/convert.py (shown in the attachment)
I am not quite sure if it is ok to do this way, but so far no further problems.

PS, How to apply to fix a bug please? Launchpad is a totally new platform for me.

cheers.

Revision history for this message
Erdem (7Gates.co) (uneye) wrote :
Download full text (3.6 KiB)

Hi Alex,

Thanks for the lead but I got the same error..

2013-12-04 14:56:58,527 27548 INFO xxxx openerp.modules.loading: module project_mrp: loading process/project_mrp_process.xml
2013-12-04 14:56:58,541 27548 ERROR xxxx openerp.tools.convert: Parse error in /usr/lib/python2.6/site-packages/openerp-7.0_20130922_231028-py2.6.egg/openerp/addons/project_mrp/process/project_mrp_process.xml:56:
<record id="sale_stock.process_node_saleprocurement0" model="process.node">
            <field name="menu_id" ref="procurement.menu_stock_procurement_action"/>
            <field name="model_id" ref="procurement.model_procurement_order"/>
            <field name="kind">subflow</field>
            <field name="name">Procurement</field>
            <field name="subflow_id" ref="procurement.process_process_procurementprocess0"/>
            <field name="process_id" ref="sale.process_process_salesprocess0"/>
            <field name="model_states">object.state=='confirmed'</field>
            <field name="flow_start" eval="1"/>
        </record>
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/convert.py", line 847, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/openerp/tools/convert.py", line 742, in _tag_record
    self._test_xml_id(rec_id)
  File "/opt/openerp/server/openerp/tools/convert.py", line 256, in _test_xml_id
    assert modcnt == 1, """The ID "%s" refers to an uninstalled module""" % (xml_id,)
AssertionError: The ID "sale_stock.process_node_saleprocurement0" refers to an uninstalled module
2013-12-04 14:56:58,542 27548 ERROR xxxx openerp: Failed to initialize database `gates`.
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/cli/server.py", line 97, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module)
  File "/opt/openerp/server/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/opt/openerp/server/openerp/modules/registry.py", line 193, in get
    update_module)
  File "/opt/openerp/server/openerp/modules/registry.py", line 219, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/opt/openerp/server/openerp/modules/loading.py", line 350, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/openerp/server/openerp/modules/loading.py", line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/openerp/server/openerp/modules/loading.py", line 188, in load_module_graph
    load_data(module_name, idref, mode)
  File "/opt/openerp/server/openerp/modules/loading.py", line 76, in <lambda>
    load_data = lambda *args: _load_data(cr, *args, kind='data')
  File "/opt/openerp/server/openerp/modules/loading.py", line 124, in _load_data
    tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
  File "/opt/openerp/server/openerp/tools/convert.py", line 954, in convert_xml_import
    obj.parse(doc.getroot())
  File "/o...

Read more...

Revision history for this message
Alex Duan (duanyp91) wrote :

Hi Erdem,

    Have you viewed my attachment and edited the function( _test_xml_id) as I said?

Cheers.

Revision history for this message
Erdem (7Gates.co) (uneye) wrote :

Hi,

Sorry for my late reply. Yes I have did the exact same thing. And I even deleted the convert.pyc for the system to recreate it.

Same error..

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.