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

(python logger) TypeError: not all arguments converted during string formatting #23

Open
leoj3n opened this issue Apr 26, 2019 · 0 comments · May be fixed by #24
Open

(python logger) TypeError: not all arguments converted during string formatting #23

leoj3n opened this issue Apr 26, 2019 · 0 comments · May be fixed by #24

Comments

@leoj3n
Copy link

leoj3n commented Apr 26, 2019

The log.error function in manage.py:

log = logging.getLogger('manage.py')

Seems to be throwing errors of its own:

2019-04-26T06:31:09.2507594Z Traceback (most recent call last):
2019-04-26T06:31:09.2508644Z   File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
2019-04-26T06:31:09.2515852Z     msg = self.format(record)
2019-04-26T06:31:09.2523519Z   File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
2019-04-26T06:31:09.2535172Z     return fmt.format(record)
2019-04-26T06:31:09.2544375Z   File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
2019-04-26T06:31:09.2555912Z     record.message = record.getMessage()
2019-04-26T06:31:09.2562774Z   File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
2019-04-26T06:31:09.2570721Z     msg = msg % self.args
2019-04-26T06:31:09.2590664Z TypeError: not all arguments converted during string formatting
2019-04-26T06:31:09.2597323Z Logged from file manage.py, line 126

log.error(e, 'unable to get primary status while shuting down')

2019-04-26T06:31:20.5227903Z Traceback (most recent call last):
2019-04-26T06:31:20.5231264Z   File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
2019-04-26T06:31:20.5240031Z     msg = self.format(record)
2019-04-26T06:31:20.5242918Z   File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
2019-04-26T06:31:20.5246011Z     return fmt.format(record)
2019-04-26T06:31:20.5251598Z   File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
2019-04-26T06:31:20.5263066Z     record.message = record.getMessage()
2019-04-26T06:31:20.5272224Z   File "/usr/lib/python2.7/logging/__init__.py", line 329, in getMessage
2019-04-26T06:31:20.5276909Z     msg = msg % self.args
2019-04-26T06:31:20.5283054Z TypeError: not all arguments converted during string formatting
2019-04-26T06:31:20.528812Z Logged from file manage.py, line 278

log.error(e, 'unable to get primary status')

I think these calls to log.error don't follow the correct function signature.

leoj3n added a commit to leoj3n/mongodb that referenced this issue Apr 26, 2019
@leoj3n leoj3n linked a pull request Apr 26, 2019 that will close this issue
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.

1 participant