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

logger string formatting type errors #36

Closed
FoamyGuy opened this issue Aug 2, 2020 · 0 comments
Closed

logger string formatting type errors #36

FoamyGuy opened this issue Aug 2, 2020 · 0 comments

Comments

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Aug 2, 2020

Running circup.py commands under python 3.7 on Win7 I end up with a bunch of errors like this printed:

Message: 'Current library bundle up to date ({}).'
Arguments: ('20200801',)
--- Logging error ---
Traceback (most recent call last):
  File "C:\Users\o_O\AppData\Local\Programs\Python\Python37-32\lib\logging\__init__.py", line 983, in emit
    msg = self.format(record)
  File "C:\Users\o_O\AppData\Local\Programs\Python\Python37-32\lib\logging\__init__.py", line 829, in format
    return fmt.format(record)
  File "C:\Users\o_O\AppData\Local\Programs\Python\Python37-32\lib\logging\__init__.py", line 569, in format
    record.message = record.getMessage()
  File "C:\Users\o_O\AppData\Local\Programs\Python\Python37-32\lib\logging\__init__.py", line 331, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting

that all point back to lines of code in circup like logger.info("some string {}", some_var).

It seems that the logger module is not using the new style template replacements {} but instead may be expecting %s. This answer on Stack overflow points the issue and solution: https://stackoverflow.com/a/12843139/507810

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

1 participant