# Error during upgrading the module

**URL:** https://discuss.tryton.org/t/error-during-upgrading-the-module/3812
**Category:** Developer
**Created:** [February 13, 2021, 7:40pm UTC](https://discuss.tryton.org/t/error-during-upgrading-the-module/3812 "2021-02-13T19:40:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![aso](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@aso](https://discuss.tryton.org/u/aso)
#### Post date: [February 13, 2021, 7:40pm UTC](https://discuss.tryton.org/t/error-during-upgrading-the-module/3812/1 "2021-02-13T19:40:51Z")

</div>

Hi people , i was about upgrading a module but their were errors in the record of the button  
this the code xml :

```auto
 <record model="ir.model.button" id="party_upload_class_button">
<field name="name">upload_cls</field>
<field name="string">upload_cls</field>
<field name="model" search="[('model', '=', 'party.wps')]"/>
</record>  

```

* * *

when i typed the command on linux :trytond/bin/trytond-admin -c trytond.conf --all -d testd -vv, it told me this error :

```auto

In tag record model ir.model.button with id namemodule.party_upload_class_button.
Traceback (most recent call last):
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 456, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.7/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 417, in StartElement
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 333, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 492, in startElement
    self.taghandler.startElement(name, attributes)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 228, in startElement
    found, = SearchModel.search(eval(search_attr))
ValueError: not enough values to unpack (expected 1, got 0)
Traceback (most recent call last):
  File "trytond/bin/trytond-admin", line 21, in <module>
    admin.run(options)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/admin.py", line 53, in run
    activatedeps=options.activatedeps)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/pool.py", line 160, in init
    lang=lang, activatedeps=activatedeps)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/modules/ __init__.py", line 420, in load_modules
    _load_modules(update)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/modules/ __init__.py", line 390, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/modules/ __init__.py", line 232, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 456, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.7/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 417, in StartElement
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 333, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 492, in startElement
    self.taghandler.startElement(name, attributes)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 228, in startElement
    found, = SearchModel.search(eval(search_attr))
ValueError: not enough values to unpack (expected 1, got 0)

```

anyone can help me please is the code wml of the button wrong , !!! because when i disspear the code , the command work normal and how i can fix that

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [February 13, 2021, 7:54pm UTC](https://discuss.tryton.org/t/error-during-upgrading-the-module/3812/2 "2021-02-13T19:54:52Z")

</div>

The error is raised because the tryton server does not find any model named _party.wps_

Normally the problem is because one of the following reasons:

- The model name is wrong
- The model is not registered on the pool (missing on ` __init__.py` file)

Hope it helps!

---

<div class="post-metadata">

### Author: ![aso](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@aso](https://discuss.tryton.org/u/aso)
#### Post date: [February 13, 2021, 9:10pm UTC](https://discuss.tryton.org/t/error-during-upgrading-the-module/3812/3 "2021-02-13T21:10:40Z")

</div>

Thanks that u respond me, the problem was fixed , but now there is another error also about the menuitem during upgrading the code xml is:

```auto
<menuitem parent="menu_14555_d_wpqr_form" action="wizard_print_iso_wpqr2"
            id="menu_print_wpqr2" icon="tryton-print"/> 
<menuitem name = "EN ISO 14555-D" parent="menu_schweiss_wpqr_form" sequence="1"
             id="menu_14555_d_wpqr_form"/>
<menuitem name = "Creation of the certificate " parent="menu_14555_d_wpqr_form" sequence="1"
      action = "act_wpqr2_form" id="Creation _wpqr2_form"/>  

```

when i typed the command on linux: `trytond/bin/trytond-admin -c trytond.conf --all -d testd -vv`, it told me this error: Tag menuitem with id namemodule.menu\_print\_wpqr2

```auto
Traceback (most recent call last):
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 456, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.7/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 417, in StartElement
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 333, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 492, in startElement
    self.taghandler.startElement(name, attributes)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 62, in startElement
    values['parent'] = self.mh.get_id(values['parent'])
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 534, in get_id
    % ".".join([module, xml_id]))
Exception: Reference to namemodule.menu_14555_d_wpqr_form not found
Traceback (most recent call last):
  File "trytond/bin/trytond-admin", line 21, in <module>
    admin.run(options)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/admin.py", line 53, in run
    activatedeps=options.activatedeps)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/pool.py", line 160, in init
    lang=lang, activatedeps=activatedeps)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/modules/ __init__.py", line 420, in load_modules
    _load_modules(update)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/modules/ __init__.py", line 390, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/modules/ __init__.py", line 232, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 456, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.7/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 417, in StartElement
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 333, in start_element
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 492, in startElement
    self.taghandler.startElement(name, attributes)
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 62, in startElement
    values['parent'] = self.mh.get_id(values['parent'])
  File "/home/dev/.virtualenvs/namepro/trytond/trytond/convert.py", line 534, in get_id
    % ".".join([module, xml_id]))
Exception: Reference to namemodule.menu_14555_d_wpqr_form not found

```

I want to know if u have an idea just what it can be the problem?

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [February 15, 2021, 9:35am UTC](https://discuss.tryton.org/t/error-during-upgrading-the-module/3812/4 "2021-02-15T09:35:03Z")

</div>

Now your problem is that you have set a parent xml\_id which does not exist.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [March 17, 2021, 9:35am UTC](https://discuss.tryton.org/t/error-during-upgrading-the-module/3812/5 "2021-03-17T09:35:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
