Error when i do trytond-admin

I was trying to initialize my module with trytond-admin

And this happen:

(tryton66) name@pop-os:~/tryton-6.6$ trytond-admin -c trytond.conf -d tryton6 --all
/home/name/.virtualenvs/tryton66/bin/trytond-admin:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('trytond==6.6.15')
Traceback (most recent call last):
  File "/home/name/.virtualenvs/tryton66/bin/trytond-admin", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/name/tryton-6.6/trytond/bin/trytond-admin", line 31, in <module>
    admin.run(options)
  File "/home/name/tryton-6.6/trytond/trytond/admin.py", line 57, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/name/tryton-6.6/trytond/trytond/pool.py", line 153, in init
    self.start()
  File "/home/name/tryton-6.6/trytond/trytond/pool.py", line 106, in start
    register_classes()
  File "/home/name/tryton-6.6/trytond/trytond/modules/__init__.py", line 363, in register_classes
    the_module = import_module(module)
  File "/home/name/tryton-6.6/trytond/trytond/modules/__init__.py", line 52, in import_module
    module = importlib.import_module(fullname)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/name/tryton-6.6/trytond/trytond/modules/health_webdav3_server/__init__.py", line 25, in <module>
    from .webdav import *
  File "/home/name/tryton-6.6/trytond/trytond/modules/health_webdav3_server/webdav.py", line 50, in <module>
    class Collection(ModelSQL, ModelView):
  File "/home/name/tryton-6.6/trytond/trytond/modules/health_webdav3_server/webdav.py", line 53, in Collection
    name = fields.Char('Name', required=True, select=True)
TypeError: Char.__init__() got an unexpected keyword argument 'select'

If you read the error message, it says that Char.__init__() got an unexpected keyword argument 'select'.

It even tells you where it happens: in the file /home/name/tryton-6.6/trytond/trytond/modules/health_webdav3_server/webdav.py at the line 53 in the class named Collection.

What happens is that you’re using an incompatible version of the module. You should update the code to remove all the select=True.

There have been other changes, you should really read the release notes first to apply all the changes that are explained there to your code.

Ah, so that’s why. Thank you for answering.

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