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

redundant logging statement causes KeyError due to name collision #7682

Closed
GordonMcGregor opened this issue May 10, 2024 · 1 comment
Closed

Comments

@GordonMcGregor
Copy link

logger.info("Running component {name}", name=name)

logger.info("Running component {name}", name=name)
logger.info("Running component {component_name}", component_name =name)

Log statement using name=name is duplicate and causes KeyError in Python 3.9.16

File "...lib/python3.9/site-packages/haystack/core/pipeline/pipeline.py", line 862, in run
logger.info("Running component {name}", name=name)
...

raise KeyError("Attempt to overwrite %r in LogRecord" % key)

KeyError: "Attempt to overwrite 'name' in LogRecord"

@anakin87
Copy link
Member

done in #7679

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

2 participants