Skip to content

fix: remove extra arg from dry-run logger.info call#2326

Open
ABD07xx wants to merge 3 commits intomicrosoft:mainfrom
ABD07xx:fix/issue-2254-dry-run-logging
Open

fix: remove extra arg from dry-run logger.info call#2326
ABD07xx wants to merge 3 commits intomicrosoft:mainfrom
ABD07xx:fix/issue-2254-dry-run-logging

Conversation

@ABD07xx
Copy link
Copy Markdown

@ABD07xx ABD07xx commented Apr 15, 2026

Description

Remove extra positional argument from logger.info() in the dry-run exit path.

The format string has no %s placeholder, so passing True as a second argument can cause:

TypeError: not all arguments converted during string formatting

This occurs with certain logging backends that strictly validate format arguments.


Related Issues

Fixes #2254


Proposed Changes

  • File: packages/graphrag/graphrag/cli/index.py
  • Line: 119

Before

logger.info("Dry run complete, exiting...", True)

After

logger.info("Dry run complete, exiting...")

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation (if necessary).
  • I have added appropriate unit tests (if applicable).

Additional Notes

The extra True argument is a no-op in most logging backends, but raises a TypeError in backends that strictly validate format arguments (reproducible with Ollama-based setups).

This is a minimal (1-character) fix with no impact on the normal execution path.

Fixes microsoft#2254 — logger.info() was called with an extra True positional
argument and no matching %s placeholder, causing TypeError with some
logging backends (e.g. Ollama).
@ABD07xx ABD07xx requested a review from a team as a code owner April 15, 2026 07:41
@ABD07xx
Copy link
Copy Markdown
Author

ABD07xx commented Apr 15, 2026

@microsoft-github-policy-service agree

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

Successfully merging this pull request may close these issues.

[Bug]: An error occurred when embedding vectors using nomic-embed-text deployed locally by ollama.

1 participant