Skip to content

[Bug]: Missing _on_error Method in CommunityReportsExtractor #5877

Closed
@alvinfoc

Description

@alvinfoc

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

v0.16.0-63-g7b5d8312 full

RAGFlow image version

v0.16.0-63-g7b5d8312 full

Other environment information

version:RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly
OS type: Windows
Environment Details:
 ·Memory: 16GB RAM
 ·GPU Memory: 12GB NVIDIA GPU

Actual behavior

An exception is raised when the _on_error method is invoked, as it does not exist in the CommunityReportsExtractor class or its parent class.
The errors occur during the execution of the Start Graph Resolution task, halting the program's execution.

Expected behavior

The CommunityReportsExtractor class should either implement the _on_error method to handle exceptions appropriately or inherit a default implementation of _on_error from its parent class (Extractor), if such functionality is required across all subclasses.

Steps to reproduce

1.Import a PDF document larger than 2700KB.
2.Use the manual parsing method to process the document.
3.Execute the task: Start Graph Resolution.
4.Observe the following errors:
 ·[ERROR]Fail to bind LLM used by GraphRAG community reports generation: 
 'CommunityReportsExtractor' object has no attribute '_on_error'
 ·[ERROR][Exception]: 'CommunityReportsExtractor' object has no attribute '_on_error'

Additional information

The CommunityReportsExtractor class, located in the file graphrag.general.community_reports_extractor.py, is being incorrectly invoked with an assumption that it implements the _on_error method. However, the _on_error method is not defined in either the CommunityReportsExtractor class or its parent class (Extractor). This results in a runtime error: 'CommunityReportsExtractor' object has no attribute '_on_error'.
During this bug discovery, it was not possible to identify which external document or module calls the CommunityReportsExtractor class via the Start Graph Resolution task. Further investigation is needed to trace the exact source of the invocation to better understand the context and dependencies involved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions