ImportError: cannot import name 'load_modules'

I ve installed tryton 5.0.0 and gnu health 3.6.3 and when I run
I ve error

  File "bin\trytond", line 24, in <module>
    from trytond.wsgi import app
  File "C:\appli\tryton\server\trytond\wsgi.py", line 18, in <module>
    from trytond.protocols.wrappers import Request
  File "C:\appli\tryton\server\trytond\protocols\wrappers.py", line 15, in <module>
    from trytond import security, backend
  File "C:\appli\tryton\server\trytond\security.py", line 5, in <module>
    from trytond.pool import Pool
  File "C:\appli\tryton\server\trytond\pool.py", line 6, in <module>
    from trytond.modules import load_modules, register_classes
ImportError: cannot import name 'load_modules'

This looks like a bad or incomplete installation.
As the path in the traceback does not seem to be a installation path (usually it is under site-packages), I suspect that you did not installed using pip install as recommended when you install from the packages.

You should follow the installation wiki from gun health I was able to install without any problem downloading the tar ball and then running ./gnuhealth-setup install. It will download all dependencies including tryton packages, also remember create a new user for installation. Do don’t use root .

I use Windows 10 so I must modified this scripts.

We should put the __init__.py file in the trytond/modules directory. It worked

It’s strange as there’s already a __init__.py in the modules directory.
Like @ced said your installation was probably faulty.

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