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

TypeError: not enough arguments for format string #6588

Closed
orf opened this issue Jun 16, 2022 · 2 comments · Fixed by #6589
Closed

TypeError: not enough arguments for format string #6588

orf opened this issue Jun 16, 2022 · 2 comments · Fixed by #6589

Comments

@orf
Copy link
Contributor

orf commented Jun 16, 2022

In #6566, the following line was added/moved:

logger.debug("Purge task key: %s state: %s; stimulus_id=%s", ts.key, ts.state)

We're missing a stimulus_id argument to the format string, which results in a lot of spammy errors from logging:

2022-06-16T16:42:29.486762121Z --- Logging error ---
2022-06-16T16:42:29.486764931Z Traceback (most recent call last):
2022-06-16T16:42:29.486767752Z   File "/usr/local/lib/python3.9/logging/__init__.py", line 1083, in emit
2022-06-16T16:42:29.486770532Z     msg = self.format(record)
2022-06-16T16:42:29.486773632Z   File "/usr/local/lib/python3.9/logging/__init__.py", line 927, in format
2022-06-16T16:42:29.486779212Z     return fmt.format(record)
2022-06-16T16:42:29.486782252Z   File "/usr/local/lib/python3.9/logging/__init__.py", line 663, in format
2022-06-16T16:42:29.486785202Z     record.message = record.getMessage()
2022-06-16T16:42:29.486788192Z   File "/usr/local/lib/python3.9/logging/__init__.py", line 367, in getMessage
2022-06-16T16:42:29.486791072Z     msg = msg % self.args
2022-06-16T16:42:29.486793722Z TypeError: not enough arguments for format string
@orf
Copy link
Contributor Author

orf commented Jun 16, 2022

cc @crusaderky as you made the change. I can make a PR to remove the stimulus_id=%s section

@crusaderky
Copy link
Collaborator

Thanks for spotting it

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 a pull request may close this issue.

2 participants