Skip to content

bug: vector store db_uri whitespace check uses .strip without parentheses, always False #2381

@hanhan761

Description

@hanhan761

Description

In graph_rag_config.py, the vector store config validation checks store.db_uri.strip == "" to detect empty URIs. However, .strip is used without parentheses, so it returns a bound method reference instead of the trimmed string. The comparison bound_method == "" is always False, so whitespace-only URIs are never caught and the default value is never applied.

Root Cause

Line 273: if not store.db_uri or store.db_uri.strip == "":

store.db_uri.strip is the method object str.strip, not the result of strip(). This method object is never equal to "", so the guard never triggers for whitespace-only values.

Proposed Fix

Change store.db_uri.strip == "" to store.db_uri.strip() == "".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions