After the version upgrade and data migration, the knowledge base hit test reports an error #6971

Closed
opened 2026-02-21 18:18:11 -05:00 by yindo · 2 comments
Owner

Originally created by @ricky977 on GitHub (Nov 27, 2024).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After upgrading from 0.6.8 to 0.10.2, and backing up the volumes folder to complete the data migration, but the knowledge base recall test after the upgrade keeps reporting errors
报错

✔️ Expected Behavior

The knowledge base hit test can be retrieved normally

Actual Behavior

Traceback (most recent call last):
File "/app/api/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/app/api/.venv/lib/python3.10/site-packages/flask/app.py", line 865, 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.10/site-packages/flask_restful/__init__.py", line 489, in wrapper
resp = resource(*args, **kwargs)
File "/app/api/.venv/lib/python3.10/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.10/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
resp = meth(*args, **kwargs)
File "/app/api/controllers/console/setup.py", line 65, in decorated
return view(*args, **kwargs)
File "/app/api/libs/login.py", line 92, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/app/api/controllers/console/wraps.py", line 22, in decorated
return view(*args, **kwargs)
File "/app/api/controllers/console/datasets/hit_testing.py", line 21, in post
return self.perform_hit_testing(dataset, args)
File "/app/api/controllers/console/datasets/hit_testing_base.py", line 85, in perform_hit_testing
raise InternalServerError(str(e))
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: Error during query: [{'locations': [{'column': 6, 'line': 1}], 'message': 'Cannot query field "Vector_index_eb93306a_b524_473b_b24f_e3b548353712_Node" on type "GetObjectsObj".', 'path': None}]

Originally created by @ricky977 on GitHub (Nov 27, 2024). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After upgrading from 0.6.8 to 0.10.2, and backing up the volumes folder to complete the data migration, but the knowledge base recall test after the upgrade keeps reporting errors ![报错](https://github.com/user-attachments/assets/97619290-8eac-4f91-8597-cfba55bf5896) ### ✔️ Expected Behavior The knowledge base hit test can be retrieved normally ### ❌ Actual Behavior Traceback (most recent call last): File "/app/api/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/app/api/.venv/lib/python3.10/site-packages/flask/app.py", line 865, 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.10/site-packages/flask_restful/__init__.py", line 489, in wrapper resp = resource(*args, **kwargs) File "/app/api/.venv/lib/python3.10/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.10/site-packages/flask_restful/__init__.py", line 604, in dispatch_request resp = meth(*args, **kwargs) File "/app/api/controllers/console/setup.py", line 65, in decorated return view(*args, **kwargs) File "/app/api/libs/login.py", line 92, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) File "/app/api/controllers/console/wraps.py", line 22, in decorated return view(*args, **kwargs) File "/app/api/controllers/console/datasets/hit_testing.py", line 21, in post return self.perform_hit_testing(dataset, args) File "/app/api/controllers/console/datasets/hit_testing_base.py", line 85, in perform_hit_testing raise InternalServerError(str(e)) werkzeug.exceptions.InternalServerError: 500 Internal Server Error: Error during query: [{'locations': [{'column': 6, 'line': 1}], 'message': 'Cannot query field "Vector_index_eb93306a_b524_473b_b24f_e3b548353712_Node" on type "GetObjectsObj".', 'path': None}]
yindo added the 🐞 bug👻 feat:rag labels 2026-02-21 18:18:11 -05:00
yindo closed this issue 2026-02-21 18:18:11 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 27, 2024):

The error you're encountering, specifically the "500 Internal Server Error" with the message about the unqueryable field "Vector_index_eb93306a_b524_473b_b24f_e3b548353712_Node," suggests that there might be an issue with the dataset index or the configuration of the knowledge base after the upgrade.

Here are some potential causes and steps to address the issue:

  1. Index Initialization: Ensure that the dataset index is properly initialized. An IndexNotInitializedError can occur if the index is not set up correctly, leading to such errors during hit testing.

  2. Data Migration: Verify that the data migration process was completed successfully. Any discrepancies or incomplete migrations could lead to issues with querying the knowledge base.

  3. Configuration Files: Double-check the configuration files, especially those related to the knowledge base and dataset indexing. Ensure that all necessary fields and settings are correctly defined.

  4. Dependencies and Environment: Make sure that all dependencies are up to date and that the environment is correctly configured. This includes ensuring that the correct versions of Python and other libraries are being used.

  5. Logs and Debugging: Review the logs for any additional error messages or warnings that might provide more context about the issue. This can help pinpoint the exact cause of the problem.

  6. Code Changes: If there were any changes to the codebase related to the knowledge base or dataset indexing between versions 0.6.8 and 0.10.2, ensure that these changes are correctly integrated into your setup.

If these steps do not resolve the issue, you may need to delve deeper into the specific changes made in the codebase related to the knowledge base and dataset indexing between the two versions.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 27, 2024): <!-- Answer --> The error you're encountering, specifically the "500 Internal Server Error" with the message about the unqueryable field "Vector_index_eb93306a_b524_473b_b24f_e3b548353712_Node," suggests that there might be an issue with the dataset index or the configuration of the knowledge base after the upgrade. Here are some potential causes and steps to address the issue: 1. **Index Initialization**: Ensure that the dataset index is properly initialized. An `IndexNotInitializedError` can occur if the index is not set up correctly, leading to such errors during hit testing. 2. **Data Migration**: Verify that the data migration process was completed successfully. Any discrepancies or incomplete migrations could lead to issues with querying the knowledge base. 3. **Configuration Files**: Double-check the configuration files, especially those related to the knowledge base and dataset indexing. Ensure that all necessary fields and settings are correctly defined. 4. **Dependencies and Environment**: Make sure that all dependencies are up to date and that the environment is correctly configured. This includes ensuring that the correct versions of Python and other libraries are being used. 5. **Logs and Debugging**: Review the logs for any additional error messages or warnings that might provide more context about the issue. This can help pinpoint the exact cause of the problem. 6. **Code Changes**: If there were any changes to the codebase related to the knowledge base or dataset indexing between versions 0.6.8 and 0.10.2, ensure that these changes are correctly integrated into your setup. If these steps do not resolve the issue, you may need to delve deeper into the specific changes made in the codebase related to the knowledge base and dataset indexing between the two versions. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Nov 27, 2024):

Sorry we do not fix bugs in previous versions any longer, please upgrade to v0.12.1.
Also, please make sure you have follow the release log to upgrade it. Since 0.10.x has some breaking changes.

@crazywoola commented on GitHub (Nov 27, 2024): Sorry we do not fix bugs in previous versions any longer, please upgrade to v0.12.1. Also, please make sure you have follow the release log to upgrade it. Since 0.10.x has some breaking changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6971