How to resolve tryton.cfg not found?

Recently, my friend who works on other module commit his module to git, so I pulled it.
But when I try to compile the tryton with:

trytond-admin -c trytond.conf -d tryton --all

Error like below turned up:

Traceback (most recent call last):
  File "/home/tryton/afx_project/.env/bin/trytond-admin", line 33, in <module>
    admin.run(options)
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/admin.py", line 59, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/pool.py", line 138, in init
    self.start()
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/pool.py", line 110, in start
    register_classes(with_test=cls.test)
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/modules/__init__.py", line 345, in register_classes
    for node in create_graph(get_modules(with_test=with_test)):
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/modules/__init__.py", line 97, in create_graph
    info = get_module_info(module)
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/modules/__init__.py", line 36, in get_module_info
    with tools.file_open(os.path.join(name, 'tryton.cfg')) as fp:
  File "/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/tools/misc.py", line 50, in file_open
    return io.open(path, mode, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/modules/afx_leave/tryton.cfg'

Everything was fine before. How to resolve this.. I really cannot continue my work’
I already tried to Uninstall and reinstall his module but it doesn’t work

Really need help, thanks

Bromo

Either the module was not correctly installed or it does not contain the tryton.cfg file.

Check in /home/tryton/afx_project/.env/lib/python3.10/site-packages/trytond/modules/afx_leave if the file is there and if it’s not there ask your friend to include it in the git repository of the module.

1 Like

This commonly happens when you use editable installation and that your module can no more be imported (because you added a new dependency or make typo). So trytond tries to find the module in its own directory.

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