Closed
Description
The recent versions of the package have the bug that prevents from using it on Windows installations since python's socket.py on Windows doesn't have the MSG_DONTWAIT option. Here's the sample traceback:
File "<src_path>\app.py", line 43, in main
logger.info('Account api started')
File "<src_path>\appdata\local\programs\python\python36\Lib\logging\__init__.py", line 1306, in info
self._log(INFO, msg, args, **kwargs)
File "<src_path>\appdata\local\programs\python\python36\Lib\logging\__init__.py", line 1442, in _log
self.handle(record)
File "<src_path>\appdata\local\programs\python\python36\Lib\logging\__init__.py", line 1452, in handle
self.callHandlers(record)
File "<src_path>\appdata\local\programs\python\python36\Lib\logging\__init__.py", line 1514, in callHandlers
hdlr.handle(record)
File "<src_path>\appdata\local\programs\python\python36\Lib\logging\__init__.py", line 863, in handle
self.emit(record)
File "<src_path>\Envs\pms.account.queryapi\lib\site-packages\fluent\handler.py", line 225, in emit
data)
File "<src_path>\Envs\pms.account.queryapi\lib\site-packages\fluent\sender.py", line 97, in emit_with_time
return self._send(bytes_)
File "<src_path>\Envs\pms.account.queryapi\lib\site-packages\fluent\sender.py", line 139, in _send
return self._send_internal(bytes_)
File "<src_path>\Envs\pms.account.queryapi\lib\site-packages\fluent\sender.py", line 148, in _send_internal
self._send_data(bytes_)
File "<src_path>\Envs\pms.account.queryapi\lib\site-packages\fluent\sender.py", line 190, in _send_data
self._check_recv_side()
File "<src_path>\Envs\pms.account.queryapi\lib\site-packages\fluent\sender.py", line 173, in _check_recv_side
recvd = self.socket.recv(4096, socket.MSG_DONTWAIT)
AttributeError: module 'socket' has no attribute 'MSG_DONTWAIT'
I had to switch to version 0.6.0 where there is no _check_recv_side
method that fails.
Here's the similar problem and solution used in another lib: https://github.com/banjiewen/bernhard/issues/15