pywebcopy icon indicating copy to clipboard operation
pywebcopy copied to clipboard

Logging Error - TypeError: %d format: a number is required, not NoneType

Open mar2194 opened this issue 4 years ago • 1 comments

I get this error when using pywebcopy inside of a Docker container:

File "/usr/local/lib/python3.9/logging/__init__.py", line 430, in _format
    return self._fmt % record.__dict__
TypeError: %d format: a number is required, not NoneType"

I tried suppressing logging from this module using:

logging.getLogger("pywebcopy").propagate = False
logging.getLogger("urllib3").propagate = False
logging.getLogger("pywebcopy").setLevel(logging.CRITICAL)
logging.getLogger("urllib3").setLevel(logging.CRITICAL)

But the issue persists. Unfortunately the logging traceback doesn't tell me what line in pywebcopy is causing the problem (this is a general problem with the logging module). Anyways, it would appear that somewhere in the code there is a debug statement using a variable that doesn't exist: logging.debug('Some error message %d', non_existent_variable)

mar2194 avatar Sep 26 '21 02:09 mar2194

File "/usr/local/lib/python3.9/logging/__init__.py", line 430, in _format return self._fmt % record.__dict__ TypeError: %d format: a number is required, not NoneType"

This seems to be occurring in the logging library itself, I think it is a particular usecase problem.

rajatomar788 avatar Oct 04 '21 15:10 rajatomar788