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

Fix minor logging issue #109

Merged
merged 2 commits into from
Oct 6, 2023
Merged

Fix minor logging issue #109

merged 2 commits into from
Oct 6, 2023

Conversation

curefatih
Copy link
Contributor

Hi

Current usage with the DEBUG mode logs raises errors like this one

File "/usr/local/lib/python3.8/site-packages/nemoguardrails/llm/providers.py", line 55, in discover_langchain_providers
    log.debug("Adding async support to", provider_cls.__name__)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 1434, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 954, in handle
    self.emit(record)
  File "/usr/local/lib/python3.8/site-packages/nose/plugins/logcapture.py", line 82, in emit
    self.buffer.append(self.format(record))
  File "/usr/local/lib/python3.8/logging/__init__.py", line 929, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.8/logging/__init__.py", line 668, in format
    record.message = record.getMessage()
  File "/usr/local/lib/python3.8/logging/__init__.py", line 373, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting

I believe this is because of the usage of the debug log not including %s. Could you please check? Thanks!

@drazvan drazvan self-assigned this Sep 5, 2023
@drazvan drazvan merged commit ce21330 into NVIDIA:main Oct 6, 2023
1 check passed
@curefatih curefatih deleted the patch-1 branch October 12, 2023 15:09
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.

2 participants