pykafka icon indicating copy to clipboard operation
pykafka copied to clipboard

logging when log doesn't exists :bug in old release

Open vijuSR opened this issue 7 years ago • 4 comments

Noticed the following exception:

Exception ignored in: <bound method RequestHandler.__del__ of <pykafka.handlers.RequestHandler object at 0x00000050FD225 828>> Traceback (most recent call last): File "G:\VENVIRONMENT\granular\lib\site-packages\pykafka\handlers.py", line 164, in __del__ File "G:\VENVIRONMENT\granular\lib\site-packages\pykafka\handlers.py", line 189, in stop File "C:\Python36\lib\logging\__init__.py", line 1306, in info File "C:\Python36\lib\logging\__init__.py", line 1442, in _log File "C:\Python36\lib\logging\__init__.py", line 1452, in handle File "C:\Python36\lib\logging\__init__.py", line 1514, in callHandlers File "C:\Python36\lib\logging\__init__.py", line 863, in handle File "C:\Python36\lib\logging\__init__.py", line 1069, in emit File "C:\Python36\lib\logging\__init__.py", line 1059, in _open NameError: name 'open' is not defined

After checking the code found it has been already resolved. So when to expect the new release.

vijuSR avatar Sep 03 '18 13:09 vijuSR

There are enough changes since 2.7.0 for a new minor version release. It needs to be tested for a bit, so I wouldn't expect it for the next month at least. In the meantime you can depend on 2.8.0-dev.3 if you need this change.

emmettbutler avatar Sep 03 '18 15:09 emmettbutler

This error has been solved yet? I use 2.8.0-dev.5 、2.8.1-dev.1 also have this problem.

sunhailin-Leo avatar Nov 20 '18 09:11 sunhailin-Leo

--- Logging error ---
Traceback (most recent call last):
  File "C:\Python\Python36\lib\logging\handlers.py", line 73, in emit
    logging.FileHandler.emit(self, record)
  File "C:\Python\Python36\lib\logging\__init__.py", line 1070, in emit
    self.stream = self._open()
  File "C:\Python\Python36\lib\logging\__init__.py", line 1060, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
NameError: name 'open' is not defined
Call stack:
  File "C:\Python\Python36\lib\site-packages\pykafka\handlers.py", line 164, in __del__
    self.stop()
  File "C:\Python\Python36\lib\site-packages\pykafka\handlers.py", line 190, in stop
    log.info("RequestHandler.stop: about to flush requests queue")
Message: 'RequestHandler.stop: about to flush requests queue'
Arguments: ()

sunhailin-Leo avatar Nov 26 '18 10:11 sunhailin-Leo

@sunhailin-Leo When does this error happen? It looks like something that would happen during interpreter shutdown. Maybe you can provide some code that reproduces the issue?

emmettbutler avatar Nov 26 '18 17:11 emmettbutler