As I use docker,
I tried to input
docker run --rm -ti tryton/tryton trytond-console -d tryton_database
There is this error returned :
connection to “tryton_database” failed
Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/trytond/backend/postgresql/database.py”, line 229, in new
inst._connpool = ThreadedConnectionPool(
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/psycopg2/pool.py”, line 161, in init
AbstractConnectionPool.init(
File “/usr/lib/python3/dist-packages/psycopg2/pool.py”, line 59, in init
self._connect()
File “/usr/lib/python3/dist-packages/psycopg2/pool.py”, line 63, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/psycopg2/init.py”, line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: could not translate host name “postgres” to address: Name or service not knownTraceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/trytond/transaction.py”, line 179, in start
database = backend.Database(database_name).connect()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/trytond/backend/postgresql/database.py”, line 229, in new
inst._connpool = ThreadedConnectionPool(
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/psycopg2/pool.py”, line 161, in init
AbstractConnectionPool.init(
File “/usr/lib/python3/dist-packages/psycopg2/pool.py”, line 59, in init
self._connect()
File “/usr/lib/python3/dist-packages/psycopg2/pool.py”, line 63, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/psycopg2/init.py”, line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: could not translate host name “postgres” to address: Name or service not knownDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/bin/trytond-console”, line 30, in
console.run(options)
File “/usr/local/lib/python3.11/dist-packages/trytond/console.py”, line 45, in run
with Transaction().start(db_name, 0, readonly=True):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/trytond/transaction.py”, line 218, in start
self.stop(False)
File “/usr/local/lib/python3.11/dist-packages/trytond/transaction.py”, line 237, in stop
self.rollback()
File “/usr/local/lib/python3.11/dist-packages/trytond/transaction.py”, line 355, in rollback
for datamanager in self._datamanagers:
^^^^^^^^^^^^^^^^^^
AttributeError: ‘Transaction’ object has no attribute ‘_datamanagers’
Can somebody help me please ?