ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: Error 'Chunk not found!' while editing chunk

Open waiking1970 opened this issue 1 year ago • 2 comments

Describe your problem

Error 'Chunk not found!' while double click a chunk.

waiking1970 avatar Nov 07 '24 10:11 waiking1970

Could you elabrate on that? Can't reproduce here.

KevinHuSh avatar Nov 08 '24 01:11 KevinHuSh

After logging in with a different account, the problem did not occur again.

waiking1970 avatar Nov 08 '24 03:11 waiking1970

我这里有同样的报错。

1、我加入了两个team(A、B),界面上显示了来自3个team的知识库(包括我自己的team); 2、我只能编辑A的chunk,双击编辑 自己/B 的chunk,会报错102 chunk not found;

按理说,应该是我只能编辑自己的chunk。

uu5208 avatar Dec 29 '24 07:12 uu5208

Currently, team members are allowed to perform file operations. "Chunk not found" seems to be a bug that occurs when accessing a chunk of a file that hasn't been parsed yet during the first creation of the knowledge base.

Feiue avatar Jan 02 '25 06:01 Feiue

Currently, team members are allowed to perform file operations. "Chunk not found" seems to be a bug that occurs when accessing a chunk of a file that hasn't been parsed yet during the first creation of the knowledge base.

The error happens here:

@manager.route('/get', methods=['GET']) # noqa: F821 @login_required def get(): chunk_id = request.args["chunk_id"] try: tenants = UserTenantService.query(user_id=current_user.id) if not tenants: return get_data_error_result(message="Tenant not found!") tenant_id = tenants[0].tenant_id

    kb_ids = KnowledgebaseService.get_kb_ids(tenant_id)
    chunk = settings.docStoreConn.get(chunk_id, search.index_name(tenant_id), kb_ids)
    if chunk is None:
        return server_error_response(Exception("Chunk not found"))

I hope it will be fixed as soon as possible.

OblivionZen avatar Jan 03 '25 12:01 OblivionZen