update to 1.9.0 from 1.8.1 has error #18751

Closed
opened 2026-02-21 19:51:29 -05:00 by yindo · 0 comments
Owner

Originally created by @aijuntao on GitHub (Oct 2, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

My dify is 1.8.1, and I just upgraded to 1.9.0. After the upgrade was completed and the execution of docker exec it docker-api-1 UV run flash transform datasource qualifications was completed, docker-api-1 reported the following error:
`The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/app/api/controllers/service_api/app/completion.py", line 199, in post
response = AppGenerateService.generate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/services/app_generate_service.py", line 92, in generate
workflow = cls._get_workflow(app_model, invoke_from, workflow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/services/app_generate_service.py", line 245, in _get_workflow
workflow = workflow_service.get_published_workflow(app_model=app_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/services/workflow_service.py", line 146, in get_published_workflow
.first()
^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 2759, in first
return self.limit(1)._iter().first() # type: ignore
^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 2857, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2365, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2251, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement
result = conn.execute(
^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
return meth(
^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection
return connection._execute_clauseelement(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context
self._handle_dbapi_exception(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute(
File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column workflows.rag_pipeline_variables does not exist
LINE 1: ...on_variables AS workflows_conversation_variables, workflows....
^

[SQL: SELECT workflows.id AS workflows_id, workflows.tenant_id AS workflows_tenant_id, workflows.app_id AS workflows_app_id, workflows.type AS workflows_type, workflows.version AS workflows_version, workflows.marked_name AS workflows_marked_name, workflows.marked_comment AS workflows_marked_comment, workflows.graph AS workflows_graph, workflows.features AS workflows_features, workflows.created_by AS workflows_created_by, workflows.created_at AS workflows_created_at, workflows.updated_by AS workflows_updated_by, workflows.updated_at AS workflows_updated_at, workflows.environment_variables AS workflows_environment_variables, workflows.conversation_variables AS workflows_conversation_variables, workflows.rag_pipeline_variables AS workflows_rag_pipeline_variables
FROM workflows
WHERE workflows.tenant_id = %(tenant_id_1)s::UUID AND workflows.app_id = %(app_id_1)s::UUID AND workflows.id = %(id_1)s::UUID
LIMIT %(param_1)s]
[parameters: {'tenant_id_1': 'e48ce911-7f13-4a88-8086-8998638e1f7b', 'app_id_1': '68be0127-eafa-4b2a-99a2-861c0b33372f', 'id_1': 'f2da366d-b801-408d-a640-b6cbcc65bd56', 'param_1': 1}]
(Background on this error at: https://sqlalche.me/e/20/f405)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 402, in wrapper
resp = resource(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view
return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request
resp = meth(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/api/controllers/service_api/wraps.py", line 93, in decorated_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/controllers/service_api/app/completion.py", line 231, in post
raise InternalServerError()
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.`
How to solve it?

✔️ Expected Behavior

solve problems

Actual Behavior

solve problems

Originally created by @aijuntao on GitHub (Oct 2, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce My dify is 1.8.1, and I just upgraded to 1.9.0. After the upgrade was completed and the execution of docker exec it docker-api-1 UV run flash transform datasource qualifications was completed, docker-api-1 reported the following error: `The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/api/controllers/service_api/app/completion.py", line 199, in post response = AppGenerateService.generate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/app_generate_service.py", line 92, in generate workflow = cls._get_workflow(app_model, invoke_from, workflow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/app_generate_service.py", line 245, in _get_workflow workflow = workflow_service.get_published_workflow(app_model=app_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/workflow_service.py", line 146, in get_published_workflow .first() ^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 2759, in first return self.limit(1)._iter().first() # type: ignore ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 2857, in _iter result: Union[ScalarResult[_T], Result[_T]] = self.session.execute( ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2365, in execute return self._execute_internal( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2251, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement result = conn.execute( ^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1419, in execute return meth( ^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 526, in _execute_on_connection return connection._execute_clauseelement( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement ret = self._execute_context( ^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context return self._exec_single_context( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context self._handle_dbapi_exception( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2355, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context self.dialect.do_execute( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 951, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column workflows.rag_pipeline_variables does not exist LINE 1: ...on_variables AS workflows_conversation_variables, workflows.... ^ [SQL: SELECT workflows.id AS workflows_id, workflows.tenant_id AS workflows_tenant_id, workflows.app_id AS workflows_app_id, workflows.type AS workflows_type, workflows.version AS workflows_version, workflows.marked_name AS workflows_marked_name, workflows.marked_comment AS workflows_marked_comment, workflows.graph AS workflows_graph, workflows.features AS workflows_features, workflows.created_by AS workflows_created_by, workflows.created_at AS workflows_created_at, workflows.updated_by AS workflows_updated_by, workflows.updated_at AS workflows_updated_at, workflows.environment_variables AS workflows_environment_variables, workflows.conversation_variables AS workflows_conversation_variables, workflows.rag_pipeline_variables AS workflows_rag_pipeline_variables FROM workflows WHERE workflows.tenant_id = %(tenant_id_1)s::UUID AND workflows.app_id = %(app_id_1)s::UUID AND workflows.id = %(id_1)s::UUID LIMIT %(param_1)s] [parameters: {'tenant_id_1': 'e48ce911-7f13-4a88-8086-8998638e1f7b', 'app_id_1': '68be0127-eafa-4b2a-99a2-861c0b33372f', 'id_1': 'f2da366d-b801-408d-a640-b6cbcc65bd56', 'param_1': 1}] (Background on this error at: https://sqlalche.me/e/20/f405) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/api.py", line 402, in wrapper resp = resource(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/flask_restx/resource.py", line 41, in dispatch_request resp = meth(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/controllers/service_api/wraps.py", line 93, in decorated_view return view_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/controllers/service_api/app/completion.py", line 231, in post raise InternalServerError() werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.` How to solve it? ### ✔️ Expected Behavior solve problems ### ❌ Actual Behavior solve problems
yindo added the 🐞 bug label 2026-02-21 19:51:29 -05:00
yindo closed this issue 2026-02-21 19:51:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#18751