quivr icon indicating copy to clipboard operation
quivr copied to clipboard

[Issue] Logging Error : TypeError: not all arguments converted during string formatting

Open bagusindrayana opened this issue 1 year ago • 1 comments

  • Your Operating System : Windows 11
  • Your Docker and Docker Compose versions : Docker Desktop 4.21.1/Engine 24.0.2 and Docker Compose version v2.19.1
  • Your Supabase version and setup : supabase 1.0.3
  • Detailed steps to reproduce the issue :
  • Python Version : Python 3.11.4

I don't know if anyone else is experiencing this but I tried looking in the issue and nothing, first time fresh install, follow instruction on README, web frontend and backend work perfectly but in terminal got error about logging

--- Logging error ---
backend  | Traceback (most recent call last):
backend  |   File "/usr/local/lib/python3.11/logging/__init__.py", line 1110, in emit
backend  |     msg = self.format(record)
backend  |           ^^^^^^^^^^^^^^^^^^^
backend  |   File "/usr/local/lib/python3.11/logging/__init__.py", line 953, in format
backend  |     return fmt.format(record)
backend  |            ^^^^^^^^^^^^^^^^^^
backend  |   File "/usr/local/lib/python3.11/logging/__init__.py", line 687, in format
backend  |     record.message = record.getMessage()
backend  |                      ^^^^^^^^^^^^^^^^^^^
backend  |   File "/usr/local/lib/python3.11/logging/__init__.py", line 377, in getMessage
backend  |     msg = msg % self.args
backend  |           ~~~~^~~~~~~~~~~
backend  | TypeError: not all arguments converted during string formatting

error in code :

logger.info("Default brain response:", response.data)

possibly failed in print object araray from respons.data as string

temporary solution i just comment that code or parse with json

logger.info("Default brain response:", json.dumps(response.data, indent=2))

bagusindrayana avatar Jul 12 '23 11:07 bagusindrayana

remove error with

logger.info(f"Default brain response : {json.dumps(response.data, indent=2)}")

bagusindrayana avatar Jul 12 '23 19:07 bagusindrayana

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

github-actions[bot] avatar Aug 20 '23 11:08 github-actions[bot]