graphrag
graphrag copied to clipboard
How to use the index_cli in pycharm
Describe the issue
raise ImportError(
ImportError: Unable to import required dependencies: numpy: cannot import name 'NamedTuple' from partially initialized module 'typing' (most likely due to a circular import) (G:\LiProbject\project\graphrag\graphrag\index\typing.py)
Steps to reproduce
Copyright (c) 2024 Microsoft Corporation.
Licensed under the MIT License
"""The Indexing Engine package root."""
import argparse
from graphrag.index.cli import index_cli
from .cli import index_cli
if name == "main": parser = argparse.ArgumentParser() # Add the same arguments as shown in your provided code snippet
args = parser.parse_args([
"--root", "./ragtest",
# Add other arguments as needed
])
index_cli(
root=args.root,
verbose=args.verbose or False,
resume=args.resume,
memprofile=args.memprofile or False,
nocache=args.nocache or False,
reporter=args.reporter,
config=args.config,
emit=args.emit,
dryrun=args.dryrun or False,
init=args.init or False,
overlay_defaults=args.overlay_defaults or False,
cli=True,
)
GraphRAG Config Used
No response
Logs and screenshots
Traceback (most recent call last):
File "G:\LiProbject\project\graphrag\graphrag\index_main_.py", line 8, in
Additional Information
- GraphRAG Version:
- Operating System:
- Python Version:
- Related Issues: