Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use lightrag-1.0..5 TypeError: lazy_external_import.<locals>.import_class() got an unexpected keyword argument 'namespace' #457

Open
fairleehu opened this issue Dec 12, 2024 · 4 comments

Comments

@fairleehu
Copy link

rag = LightRAG(
working_dir=WORKING_DIR,
llm_model_func=llm_model_func,
embedding_func=EmbeddingFunc(
embedding_dim=embedding_dimension,
max_token_size=8192,
func=embedding_func,
),
graph_storage="Neo4JStorage",
log_level="DEBUG",
), TypeError: lazy_external_import..import_class() got an unexpected keyword argument 'namespace'

@TharunSivamani
Copy link

+1
I got the same error

@GreenerZ
Copy link

GreenerZ commented Dec 13, 2024

i'm facing the same issue. It should be a problem of inconsistent engineering paths. try modify lightrag.py

#line 70-81

return import_class()   #add ()

## #add path lightrag
Neo4JStorage = lazy_external_import("lightrag.kg.neo4j_impl", "Neo4JStorage") 
OracleKVStorage = lazy_external_import("lightrag.kg.oracle_impl", "OracleKVStorage") 
OracleGraphStorage = lazy_external_import("lightrag.kg.oracle_impl", "OracleGraphStorage") 
OracleVectorDBStorage = lazy_external_import("lightrag.kg.oracle_impl", "OracleVectorDBStorage") 
MilvusVectorDBStorge = lazy_external_import("lightrag.kg.milvus_impl", "MilvusVectorDBStorge") 
MongoKVStorage = lazy_external_import("lightrag.kg.mongo_impl", "MongoKVStorage") 
ChromaVectorDBStorage = lazy_external_import("lightrag.kg.chroma_impl", "ChromaVectorDBStorage") 
TiDBKVStorage = lazy_external_import("lightrag.kg.tidb_impl", "TiDBKVStorage") 
TiDBVectorDBStorage = lazy_external_import("lightrag.kg.tidb_impl", "TiDBVectorDBStorage")

After I made the change like this, it started running.

@GreenerZ
Copy link

ChromaVectorDBStorage = lazy_external_import("lightrag.kg.chroma_impl", "ChromaVectorDBStorage") 
TiDBKVStorage = lazy_external_import("lightrag.kg.tidb_impl", "TiDBKVStorage") 
TiDBVectorDBStorage = lazy_external_import("lightrag.kg.tidb_impl", "TiDBVectorDBStorage")


No need to add these, this is a feature submitted in the new version. Just add the ”lightrag“ before ".kg" on your own version.

@GreenerZ
Copy link

@GreenerZ

image

Can you tell me if adding the

ChromaVectorDBStorage = lazy_external_import("lightrag.kg.chroma_impl", "ChromaVectorDBStorage") 
TiDBKVStorage = lazy_external_import("lightrag.kg.tidb_impl", "TiDBKVStorage") 
TiDBVectorDBStorage = lazy_external_import("lightrag.kg.tidb_impl", "TiDBVectorDBStorage")

fixes this?

Note that you need to add () after "import_class" in line 63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants