# No module named 'trytond.backend.postgres'

**URL:** https://discuss.tryton.org/t/no-module-named-trytond-backend-postgres/4235
**Category:** Developer
**Created:** [May 20, 2021, 4:32pm UTC](https://discuss.tryton.org/t/no-module-named-trytond-backend-postgres/4235 "2021-05-20T16:32:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![andileni](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/andileni/32/1401_2.png) [@andileni](https://discuss.tryton.org/u/andileni)
#### Post date: [May 20, 2021, 4:32pm UTC](https://discuss.tryton.org/t/no-module-named-trytond-backend-postgres/4235/1 "2021-05-20T16:32:07Z")

</div>

Hello,

I tried using the proteus library to automatically create and insert data to my gnuhealth installation.  
The python script I wrote works perfectly fine as long as I run the script directly on the remote machine.  
For automation purpose I am using ansible. I transfer my script to the remote machine and try to execute it, but I get a `No module named 'trytond.backend.postgres'` error.  
I can not figure out where this error is comming from, since the programm is running fine otherwise.

This is the full traceback:

```auto
"Traceback (most recent call last):",
        " File \"tp.py\", line 183, in <module>",
        " config.set_trytond(\"postgres:///health\")",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/proteus/config.py\", line 300, in set_trytond",
        " _CONFIG.current = TrytondConfig(database, user, config_file=config_file)",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/proteus/config.py\", line 251, in __init__",
        " Pool.start()",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/pool.py\", line 102, in start",
        " register_classes()",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/modules/ __init__.py\", line 316, in register_classes",
        " import trytond.ir",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/ir/ __init__.py\", line 4, in <module>",
        " from .configuration import *",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/ir/configuration.py\", line 3, in <module>",
        " from ..model import ModelSQL, ModelSingleton, fields",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/model/ __init__.py\", line 3, in <module>",
        " from .model import Model",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/model/model.py\", line 7, in <module>",
        " from trytond.model import fields",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/model/fields/ __init__.py\", line 4, in <module>",
        " from .field import *",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/model/fields/field.py\", line 22, in <module>",
        " Database = backend.get('Database')",
        " File \"/home/gnuhealth/.local/lib/python3.6/site-packages/trytond/backend/ __init__.py\", line 25, in get",
        " module = importlib.import_module(modname)",
        " File \"/usr/lib/python3.6/importlib/ __init__.py\", line 126, in import_module",
        " return _bootstrap._gcd_import(name[level:], package, level)",
        "ModuleNotFoundError: No module named 'trytond.backend.postgres'"
``
```

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 20, 2021, 4:33pm UTC](https://discuss.tryton.org/t/no-module-named-trytond-backend-postgres/4235/2 "2021-05-20T16:33:56Z")

</div>

Your configuration is pointing to the wrong backend name. It is named `postgresql`.

---

<div class="post-metadata">

### Author: ![andileni](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/andileni/32/1401_2.png) [@andileni](https://discuss.tryton.org/u/andileni)
#### Post date: [May 20, 2021, 5:00pm UTC](https://discuss.tryton.org/t/no-module-named-trytond-backend-postgres/4235/3 "2021-05-20T17:00:41Z")

</div>

Thank you very much!  
I am honestly surprised that it worked without any problems as long as it runs on the remote machine.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [June 19, 2021, 5:01pm UTC](https://discuss.tryton.org/t/no-module-named-trytond-backend-postgres/4235/4 "2021-06-19T17:01:29Z")

</div>

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