AssertionError: <class 'trytond.pool.stock.configuration.sequence'> has no docstring

Hello everyone,

I’m trying to upgrade from 4.2 to 5.0, so I followed the migration steps:

Then to upgrade the new series, I run the command line (trytond-admin -c <config file> -d <database name> --all) and a dependency error happens:

(env) connecttix@ip-172-26-6-37:~/tryton$ ./trytond/bin/trytond-admin -c ./conf/trytond.conf -d connecttix_tryton --all
Traceback (most recent call last):
  File "./trytond/bin/trytond-admin", line 21, in <module>
    admin.run(options)
  File "/home/connecttix/tryton/trytond/trytond/admin.py", line 54, in run
    activatedeps=options.activatedeps)
  File "/home/connecttix/tryton/trytond/trytond/pool.py", line 160, in init
    lang=lang, activatedeps=activatedeps)
  File "/home/connecttix/tryton/trytond/trytond/modules/__init__.py", line 418, in load_modules
    _load_modules(update)
  File "/home/connecttix/tryton/trytond/trytond/modules/__init__.py", line 382, in _load_modules
    graph = create_graph(module_list)
  File "/home/connecttix/tryton/trytond/trytond/modules/__init__.py", line 159, in create_graph
    raise MissingDependenciesException(list(missing))
trytond.exceptions.MissingDependenciesException: Missing dependencies: stock_package_shipping

So, to fix that error, I ran next command line: (trytond-admin -c <config file> -d <database name> -u <module name> --activate-dependencies), without any success:

(env) connecttix@ip-172-26-6-37:~/tryton$ ./trytond/bin/trytond-admin -c ./conf/trytond.conf -d connecttix_tryton -u stock_package_shipping --activate-dependencies
Traceback (most recent call last):
  File "./trytond/bin/trytond-admin", line 21, in <module>
    admin.run(options)
  File "/home/connecttix/tryton/trytond/trytond/admin.py", line 54, in run
    activatedeps=options.activatedeps)
  File "/home/connecttix/tryton/trytond/trytond/pool.py", line 160, in init
    lang=lang, activatedeps=activatedeps)
  File "/home/connecttix/tryton/trytond/trytond/modules/__init__.py", line 418, in load_modules
    _load_modules(update)
  File "/home/connecttix/tryton/trytond/trytond/modules/__init__.py", line 388, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/connecttix/tryton/trytond/trytond/modules/__init__.py", line 216, in load_module_graph
    cls.__register__(module)
  File "/home/connecttix/tryton/trytond/trytond/modules/stock_package/stock.py", line 53, in __register__
    super(ConfigurationSequence, cls).__register__(module_name)
  File "/home/connecttix/tryton/trytond/trytond/modules/stock/configuration.py", line 165, in __register__
    super(ConfigurationSequence, cls).__register__(module_name)
  File "/home/connecttix/tryton/trytond/trytond/model/modelsql.py", line 201, in __register__
    super(ModelSQL, cls).__register__(module_name)
  File "/home/connecttix/tryton/trytond/trytond/model/model.py", line 119, in __register__
    model_id = Model_.register(cls, module_name)
  File "/home/connecttix/tryton/trytond/trytond/ir/model.py", line 97, in register
    [[model.__name__, model._get_name(), model.__doc__,
  File "/home/connecttix/tryton/trytond/trytond/model/model.py", line 101, in _get_name
    assert cls.__doc__, '%s has no docstring' % cls
AssertionError: <class 'trytond.pool.stock.configuration.sequence'> has no docstring
  • Could anyone tell me what’s wrong?
  • What can I do to fix it?

It seems like you are missing the stock_package_shipping module in your trytond/modules path.

@formateli No, It is installed

Have you updated the modules in each version upgrade?

There is a module that adds the ‘stock.configuration.sequence’ model which is missing the DocString.

You should set the docstring or remove the module (if you do not use it) that has declared this model.

1 Like

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