AsserttionError when running trytond-admin

When running trytond-admin on one of my (archived) test-installations, I get the error show below. Obviously something got mixed up. Anyhow, based on this error message I’m not able to determine what might be the cause. Additionally, it’s an AssertionError, so this might actually be a program error.

Also, when trying to login with the GTK client, I get the error shown secondly below.

Any Ideas how to track this issue down? See below for some other information.

traceback when running trytond-admin:

Traceback (most recent call last):
  File "/tmp/demo/_venv/bin/trytond-admin", line 23, in <module>
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/trytond/", line 53, in run
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/trytond/", line 152, in init
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/trytond/", line 105, in start
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/trytond/modules/", line 345, in register_classes
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/trytond/modules/account_invoice_stock/", line 16, in register
    module='account_invoice_stock', type_='model')
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/trytond/", line 89, in register
    assert cls not in mpool, cls
AssertionError: <class 'trytond.modules.account_invoice_stock.account.Invoice'>

Error shown in the client:

Traceback (most recent call last):
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/tryton/gui/", line 247, in do_activate
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/tryton/common/", line 922, in __init__
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/tryton/", line 86, in login
    result = connection.common.db.login(username, parameters, language)
  File "/usr/lib64/python3.7/xmlrpc/", line 1112, in __call__
    return self.__send(self.__name, args)
  File "/tmp/demo/_venv/lib64/python3.7/site-packages/tryton/", line 295, in __request
    raise Fault(*response['error'])
tryton.jsonrpc.Fault: <class 'trytond.modules.account_invoice_stock.account.Invoice'>

Fault: <class 'trytond.modules.account_invoice_stock.account.Invoice'>

More information:

  • Database was created a few weeks ago using tryton 5.8.x
  • Installed versions (trytond modules only):
trytond                       5.8.6  
trytond-account               5.8.2  
trytond-account-de-skr03      5.8.1  
trytond-account-invoice       5.8.3  
trytond-account-invoice-stock 5.8.1  
trytond-account-payment       5.8.2  
trytond-account-payment-sepa  5.8.1  
trytond-account-product       5.8.1  
trytond-bank                  5.8.1  
trytond-company               5.8.1  
trytond-country               5.8.1  
trytond-currency              5.8.1  
trytond-party                 5.8.1  
trytond-product               5.8.1  
trytond-sale                  5.8.2  
trytond-sale-subscription     5.8.2  
trytond-stock                 5.8.3  
  • By adding or removing some modules, I “managed” to change the class in the error message into “trytond.modules.account_payment.payment.Journal”

I’ve only seen this error when you are registering a class to which inherits from another class which is not in the pool because of missing dependencies.

Did you have any custom module that registers such classes? If yes, the error is there.
Anther option is that you have missing dependencies on your database or it is not correctly updated. Updating all the modules should fix this case.