Concurrency problem using proteus on 5.4

I am running Tryton in a docker container on a remote server, and I am trying to use proteus to activate some modules and do some setup on there.

Using the standard docker image for 5.2 this works without a problem, but on 5.4 it no longer works and I consistently get a concurrency exception when updating the Config Wizard Items.

I am wondering if this is a problem with the way I am doing things, or if this is a bug that needs fixing?

FYI, I did also notice this message by @wifasoi which I think may be related.

I’m happy to create a bug report if this seems to be issue, but any help with this would be greatly appreciated.

Some more details:

A cut down version of the script that works against 5.2 but not 5.4:

#!/usr/bin/env python3
from proteus import Model, Wizard, config as proteus_config

config = proteus_config.set_xmlrpc(url=url)

Module = Model.get('ir.module')
modules = Module.find([('name', 'in', [
for module in modules:'activate')

ConfigWizardItem = Model.get('ir.module.config_wizard.item')
for item in ConfigWizardItem.find([('state', '!=', 'done')]):
    item.state = 'done'

The result of running the above script against a standard tryton 5.4 container:

    Traceback (most recent call last):
  File "./", line 21, in <module>
  File "/home/dave/.venv/lib/python3.7/site-packages/proteus/", line 101, in newfunc
    return self.func(owner, [instance], *args, **kwargs)
  File "/home/dave/.venv/lib/python3.7/site-packages/proteus/", line 858, in save
  File "/usr/lib/python3.7/xmlrpc/", line 1112, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.7/xmlrpc/", line 1452, in __request
  File "/usr/lib/python3.7/xmlrpc/", line 1154, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.7/xmlrpc/", line 1170, in single_request
    return self.parse_response(resp)
  File "/usr/lib/python3.7/xmlrpc/", line 1342, in parse_response
    return u.close()
  File "/usr/lib/python3.7/xmlrpc/", line 656, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 4: 'Records were modified in the meanwhile'>

The traceback from the server:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/trytond/protocols/", line 186, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/usr/local/lib/python3.7/dist-packages/trytond/res/", line 229, in write
    super(ModuleConfigWizardItem, cls).write(items, values, *args)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/", line 951, in write
  File "/usr/local/lib/python3.7/dist-packages/trytond/model/", line 551, in __check_timestamp
    'Records were modified in the meanwhile')
trytond.exceptions.ConcurrencyException: Records were modified in the meanwhile

This has been fixed by Issue 8779: Support PostgreSQL-12 - Tryton issue tracker and is already included in the version 5.4.1 of trytond.

Brilliant, it looks like I was using an old docker image. Pulling the image, so it was updated to 5.4.1 fixed the issue.

Thank you for the fast and accurate response.

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