问题
windows10 安装docker desktop 之后,再打开diffy 127.0.0.1时,报错,查看了docker日志后,不知道应该怎么处理了
报错信息
$ docker compose logs api
api-1 | Running migrations
api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won’t be available and only tokenizers, configuration and file/data utilities can be used.
api-1 | /app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:6087: SyntaxWarning: invalid escape sequence ‘_’
api-1 | “”"function名称,只能包含a-z,A-Z,0-9,_或-
api-1 | 2025-01-09 04:47:05,494.494 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
api-1 | Preparing database migration…
api-1 | Starting database migration.
api-1 | ERROR [root] Failed to execute database migration
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/commands.py”, line 592, in upgrade_db
api-1 | flask_migrate.upgrade()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_migrate/init.py”, line 111, in wrapped
api-1 | f(*args, **kwargs)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_migrate/init.py”, line 200, in upgrade
api-1 | command.upgrade(config, revision, sql=sql, tag=tag)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/alembic/command.py”, line 406, in upgrade
api-1 | script.run_env()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/alembic/script/base.py”, line 586, in run_env
api-1 | util.load_python_file(self.dir, “env.py”)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py”, line 95, in load_python_file
api-1 | module = load_module_py(module_id, path)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/alembic/util/pyfiles.py”, line 113, in load_module_py
api-1 | spec.loader.exec_module(module) # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 999, in exec_module
api-1 | File “”, line 488, in _call_with_frames_removed
api-1 | File “/app/api/migrations/env.py”, line 112, in
api-1 | run_migrations_online()
api-1 | File “/app/api/migrations/env.py”, line 96, in run_migrations_online
api-1 | with connectable.connect() as connection:
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)
api-1 | [2025-01-09 04:47:42 +0000] [1] [INFO] Starting gunicorn 23.0.0
api-1 | [2025-01-09 04:47:42 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
api-1 | [2025-01-09 04:47:42 +0000] [1] [INFO] Using worker: gevent
api-1 | [2025-01-09 04:47:42 +0000] [28] [INFO] Booting worker with pid: 28
api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won’t be available and only tokenizers, configuration and file/data utilities can be used.
api-1 | 2025-01-09 04:47:56,796.796 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
api-1 | 2025-01-09 05:46:45,129.129 ERROR [Dummy-1] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 05:46:48,598.598 ERROR [Dummy-2] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 05:47:24,081.081 ERROR [Dummy-3] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 05:47:27,442.442 ERROR [Dummy-4] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | Running migrations
api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won’t be available and only tokenizers, configuration and file/data utilities can be used.
api-1 | 2025-01-09 10:11:55,027.027 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
api-1 | Preparing database migration…
api-1 | Database migration skipped
api-1 | [2025-01-09 10:12:20 +0000] [1] [INFO] Starting gunicorn 23.0.0
api-1 | [2025-01-09 10:12:20 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
api-1 | [2025-01-09 10:12:20 +0000] [1] [INFO] Using worker: gevent
api-1 | [2025-01-09 10:12:20 +0000] [27] [INFO] Booting worker with pid: 27
api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won’t be available and only tokenizers, configuration and file/data utilities can be used.
api-1 | 2025-01-09 10:12:33,487.487 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
api-1 | 2025-01-09 10:13:19,006.006 ERROR [Dummy-1] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 10:13:22,916.916 ERROR [Dummy-2] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 10:23:46,775.775 ERROR [Dummy-3] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 10:23:50,167.167 ERROR [Dummy-4] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 10:24:22,199.199 ERROR [Dummy-5] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
api-1 | 2025-01-09 10:24:25,568.568 ERROR [Dummy-6] [app.py:875] - Exception on /console/api/setup [GET]
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | psycopg2.OperationalError: could not translate host name “db” to address: Name or service not known
api-1 |
api-1 |
api-1 | The above exception was the direct cause of the following exception:
api-1 |
api-1 | Traceback (most recent call last):
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 917, in full_dispatch_request
api-1 | rv = self.dispatch_request()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/app.py”, line 902, in dispatch_request
api-1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 489, in wrapper
api-1 | resp = resource(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask/views.py”, line 110, in view
api-1 | return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/flask_restful/init.py”, line 604, in dispatch_request
api-1 | resp = meth(*args, **kwargs)
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 19, in get
api-1 | setup_status = get_setup_status()
api-1 | ^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/controllers/console/setup.py”, line 55, in get_setup_status
api-1 | return DifySetup.query.first()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2728, in first
api-1 | return self.limit(1)._iter().first() # type: ignore
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py”, line 2827, in _iter
api-1 | result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
api-1 | ^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2362, in execute
api-1 | return self._execute_internal(
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2237, in _execute_internal
api-1 | conn = self._connection_for_bind(bind)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 2106, in _connection_for_bind
api-1 | return trans._connection_for_bind(engine, execution_options)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “”, line 2, in _connection_for_bind
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py”, line 139, in _go
api-1 | ret_value = fn(self, *arg, **kw)
api-1 | ^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py”, line 1189, in _connection_for_bind
api-1 | conn = bind.connect()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3278, in connect
api-1 | return self._connection_cls(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 148, in init
api-1 | Connection._handle_dbapi_exception_noconnection(
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 2442, in _handle_dbapi_exception_noconnection
api-1 | raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 146, in init
api-1 | self._dbapi_connection = engine.raw_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py”, line 3302, in raw_connection
api-1 | return self.pool.connect()
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 449, in connect
api-1 | return _ConnectionFairy._checkout(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 1263, in _checkout
api-1 | fairy = _ConnectionRecord.checkout(pool)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 712, in checkout
api-1 | rec = pool._do_get()
api-1 | ^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 179, in _do_get
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py”, line 177, in _do_get
api-1 | return self._create_connection()
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 390, in _create_connection
api-1 | return _ConnectionRecord(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 674, in init
api-1 | self.__connect()
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 900, in __connect
api-1 | with util.safe_reraise():
api-1 | ^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py”, line 146, in exit
api-1 | raise exc_value.with_traceback(exc_tb)
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py”, line 896, in __connect
api-1 | self.dbapi_connection = connection = pool._invoke_creator(self)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py”, line 643, in connect
api-1 | return dialect.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py”, line 621, in connect
api-1 | return self.loaded_dbapi.connect(*cargs, **cparams)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | File “/app/api/.venv/lib/python3.12/site-packages/psycopg2/init.py”, line 122, in connect
api-1 | conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
api-1 | sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “db” to address: Name or service not known
api-1 |
api-1 | (Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)
Administrator@PC-20230904ZUAM MINGW64 /d/AI/dify/docker (main)
$