diff --git a/cognee/cli/commands/cognify_command.py b/cognee/cli/commands/cognify_command.py index 6c278b4dc..bae03eda2 100644 --- a/cognee/cli/commands/cognify_command.py +++ b/cognee/cli/commands/cognify_command.py @@ -116,7 +116,7 @@ After successful cognify processing, use `cognee search` to query the knowledge chunk_size=args.chunk_size, ontology_file_path=args.ontology_file, run_in_background=args.background, - chunks_per_batch=args.chunks_per_batch, + chunks_per_batch=getattr(args, 'chunks_per_batch', None), ) return result except Exception as e: diff --git a/cognee/tests/cli_tests/cli_unit_tests/test_cli_edge_cases.py b/cognee/tests/cli_tests/cli_unit_tests/test_cli_edge_cases.py index ca27c0f67..ae9e99ac6 100644 --- a/cognee/tests/cli_tests/cli_unit_tests/test_cli_edge_cases.py +++ b/cognee/tests/cli_tests/cli_unit_tests/test_cli_edge_cases.py @@ -373,6 +373,7 @@ class TestCognifyCommandEdgeCases: ontology_file_path=None, chunker=TextChunker, run_in_background=False, + chunks_per_batch=None, )