# Uprade 6.x: Error In tag record model (convert sax)

**URL:** <https://discuss.tryton.org/t/uprade-6-x-error-in-tag-record-model-convert-sax/4410>\
**Category:** System Administrator\
**Created:** [July 13, 2021, 1:35pm UTC](https://discuss.tryton.org/t/uprade-6-x-error-in-tag-record-model-convert-sax/4410 "2021-07-13T13:35:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![resteve](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/resteve/32/823_2.png) [@resteve](https://discuss.tryton.org/u/resteve)\
**Post date:** [July 13, 2021, 1:35pm UTC](https://discuss.tryton.org/t/uprade-6-x-error-in-tag-record-model-convert-sax/4410/1 "2021-07-13T13:35:16Z")

</div>

Try upgrading some projects to 6.x, I get error that convert (sax) that try/except get message: Error In tag record model…

` ./trytond/bin/trytond-admin -v -c etc/server-montcau.cfg -u project sale --all -d tryton60_next`

and the traceback:

```auto
[...]
If that doesn't work update the records and restart again.
27316 140637996238656 [2021-07-13 13:15:05,902] WARNING trytond.backend.postgresql.table Unable to set not null on column currency of table account_invoice_line.
Try restarting one more time.
If that doesn't work update the records and restart again.
Traceback (most recent call last):
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 457, 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 471, in EndElement
  File "/usr/lib/python3.7/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 512, in endElement
    self.taghandler = self.taghandler.endElement(name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 296, in endElement
    self.model. __name__ , self.values, self.xml_id)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 689, in import_record
    self.create_records(model, [values], [fs_id])
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 695, in create_records
    records = Model.create(vlist)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/ir/action.py", line 224, in create
    return super(ActionKeyword, cls).create(new_vlist)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelsql.py", line 679, in create
    cls._validate(sub_records)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelstorage.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelstorage.py", line 1325, in _validate
    value = getattr(record, field_name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/fields/field.py", line 344, in __get__
    return inst. __getattr__ (self.name)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelstorage.py", line 1634, in __getattr__
    read_data = self.read(list(index.keys()), list(ffields.keys()))
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/model/modelsql.py", line 687, in read
    Rule = pool.get('ir.rule')
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/pool.py", line 187, in get
    return self._pool[self.database_name][type][name]
KeyError: 'tryton60_next'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/pool.py", line 166, in init
    activatedeps=activatedeps)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/modules/ __init__.py", line 437, in load_modules
    _load_modules(update)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/modules/ __init__.py", line 405, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/modules/ __init__.py", line 252, in load_module_graph
    tryton_parser.parse_xmlstream(fp)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/convert.py", line 459, in parse_xmlstream
    raise Exception("Error " + self.current_state()) from e
Exception: Error In tag record model ir.action.keyword with id sale.act_move_form_keyword1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./trytond/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/admin.py", line 54, in run
    activatedeps=options.activatedeps)
  File "/home/raimon/projectes/nandev/tryton60/trytond/trytond/pool.py", line 168, in init
    del self._pool[self.database_name]
KeyError: 'tryton60_next'

```

Somebody know the reason I get this error? I get this error in several databases (sale, project, stock…). At the moment, some projects I solved to do the upgrade with “-u” option.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 13, 2021, 1:55pm UTC](https://discuss.tryton.org/t/uprade-6-x-error-in-tag-record-model-convert-sax/4410/2 "2021-07-13T13:55:32Z")

</div>

It looks like you did not execute the pre-migration statements.

---

<div class="post-metadata">

**Author:** ![resteve](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/resteve/32/823_2.png) [@resteve](https://discuss.tryton.org/u/resteve)\
**Post date:** [July 13, 2021, 4:41pm UTC](https://discuss.tryton.org/t/uprade-6-x-error-in-tag-record-model-convert-sax/4410/3 "2021-07-13T16:41:44Z")

</div>

Pre-migration statements are applied before do `trytond-admin --all`

- [From 5.4 to 5.6](https://discuss.tryton.org/t/migration-from-5-4-to-5-6/2303)
- [From 5.6 to 5.8](https://discuss.tryton.org/t/migration-from-5-6-to-5-8/3341)
- [From 5.8 to 6.0](https://discuss.tryton.org/t/migration-from-5-8-to-6-0/3603)

I try to comment in sale module, the ID act\_move\_form\_keyword1. I get other XML convert sax error. I try to comment… and finally do `trytond-admin --all`: upgrating is done.

Finally I revert commented XML tags, and do other `trytond-admin --all`: trytond-admin finish sucessfull (and new XML tags was created in `ir.model.data`)
