Skip to content

[BUG] The feat “ nano_graphrag” , i meet the mistake as follow #440

Closed
@WangAo-0

Description

@WangAo-0

Description

i used ollama as the local llm
llm:qwen2.5
embedding : nomic-embed-text
image

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

❯ python app.py
[nltk_data] Downloading package punkt_tab to /home/oliver/.conda/envs/
[nltk_data]     kotaemon_nano_graphrag/lib/python3.10/site-
[nltk_data]     packages/llama_index/core/_static/nltk_cache...
[nltk_data]   Unzipping tokenizers/punkt_tab.zip.
GraphRAG dependencies not installed. Try `pip install graphrag future` to install. GraphRAG retriever pipeline will not work properly.
INFO:chromadb.telemetry.product.posthog:Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
Traceback (most recent call last):
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/manager.py", line 60, in build_index
    index.on_create()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/file/index.py", line 315, in on_create
    self._setup_resources()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/file/index.py", line 140, in _setup_resources
    self._vs: BaseVectorStore = get_vectorstore(f"index_{self.id}")
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/components.py", line 36, in get_vectorstore
    return deserialize(vs_conf, safe=False)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/theflow/utils/modules.py", line 168, in deserialize
    return cls(**params)
  File "/home/oliver/kotaemon_nano_graphrag/libs/kotaemon/kotaemon/storages/vectorstores/chroma.py", line 43, in __init__
    client = chromadb.PersistentClient(path=path)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/__init__.py", line 153, in PersistentClient
    return ClientCreator(tenant=tenant, database=database, settings=settings)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/client.py", line 58, in __init__
    super().__init__(settings=settings)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/shared_system_client.py", line 19, in __init__
    SharedSystemClient._create_system_if_not_exists(self._identifier, settings)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/shared_system_client.py", line 30, in _create_system_if_not_exists
    new_system.instance(ServerAPI)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/config.py", line 424, in instance
    impl = type(self)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/segment.py", line 125, in __init__
    self._manager = self.require(SegmentManager)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/config.py", line 317, in require
    inst = self._system.instance(type)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/config.py", line 424, in instance
    impl = type(self)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/segment/impl/manager/local.py", line 96, in __init__
    // PersistentLocalHnswSegment.get_file_handle_count()
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 527, in get_file_handle_count
    hnswlib_count = hnswlib.Index.file_handle_count
AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/oliver/kotaemon_nano_graphrag/app.py", line 15, in <module>
    app = App()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/app.py", line 73, in __init__
    self.initialize_indices()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/app.py", line 84, in initialize_indices
    self.index_manager.on_application_startup()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/manager.py", line 188, in on_application_startup
    self.build_index(**index)
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/manager.py", line 68, in build_index
    raise ValueError(f'Cannot create index "{name}": {e}')
ValueError: Cannot create index "File": type object 'hnswlib.Index' has no attribute 'file_handle_count'

Browsers

No response

OS

No response

Additional information

No response

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