logging errors on resmgr download
bertsky opened this issue · comments
Looks like we have a regression on ocrd v2.49:
logs
ocrd resmgr download ocrd-sbb-binarize default-2021-03-09
22:37:23.282 INFO ocrd.cli.resmgr - Downloading registered resource 'default-2021-03-09' (https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip)
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 937, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
File "/usr/local/bin/ocrd", line 12, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/core/ocrd/ocrd/cli/resmgr.py", line 130, in download
log.info("Downloading %s resource '%s' (%s)", registered, resdict['name'], resdict['url'])
Message: "Downloading %s resource '%s' (%s)"
Arguments: ('registered', 'default-2021-03-09', 'https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip')
[------------------------------------] 0%22:37:26.132 INFO ocrd.resource_manager._download_impl - Downloading https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip to download.tar.xx
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 937, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
File "/usr/local/bin/ocrd", line 12, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/core/ocrd/ocrd/cli/resmgr.py", line 156, in download
fpath = resmgr.download(
File "/build/core/ocrd/ocrd/resource_manager.py", line 328, in download
self._download_impl(url, archive_fname, progress_cb)
File "/build/core/ocrd/ocrd/resource_manager.py", line 240, in _download_impl
log.info("Downloading %s to %s" % (url, filename))
Message: 'Downloading https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip to download.tar.xx'
Arguments: ()
[####################################] 100% 22:37:29.360 INFO ocrd.resource_manager.download - Extracting application/zip archive to /tmp/tmpxdlxlay0/out
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 937, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
File "/usr/local/bin/ocrd", line 12, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/core/ocrd/ocrd/cli/resmgr.py", line 156, in download
fpath = resmgr.download(
File "/build/core/ocrd/ocrd/resource_manager.py", line 341, in download
log.info("Extracting %s archive to %s/out" % (mimetype, tempdir))
Message: 'Extracting application/zip archive to /tmp/tmpxdlxlay0/out'
Arguments: ()
22:37:30.189 INFO ocrd.resource_manager.download - Copying '.' from archive to /models/ocrd-resources/ocrd-sbb-binarize/default-2021-03-09
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 937, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
File "/usr/local/bin/ocrd", line 12, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/core/ocrd/ocrd/cli/resmgr.py", line 156, in download
fpath = resmgr.download(
File "/build/core/ocrd/ocrd/resource_manager.py", line 350, in download
log.info("Copying '%s' from archive to %s" % (path_in_archive, fpath))
Message: "Copying '.' from archive to /models/ocrd-resources/ocrd-sbb-binarize/default-2021-03-09"
Arguments: ()
22:37:30.289 INFO ocrd.cli.resmgr - Installed resource https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip under /models/ocrd-resources/ocrd-sbb-binarize/default-2021-03-09
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 937, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
File "/usr/local/bin/ocrd", line 12, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/core/ocrd/ocrd/cli/resmgr.py", line 171, in download
log.info("Installed resource %s under %s", resdict['url'], fpath)
Message: 'Installed resource %s under %s'
Arguments: ('https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip', PosixPath('/models/ocrd-resources/ocrd-sbb-binarize/default-2021-03-09'))
22:37:30.290 INFO ocrd.cli.resmgr - Use in parameters as 'default-2021-03-09'
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 855, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 937, in emit
self._connect_unixsocket(self.address)
File "/usr/lib/python3.8/logging/handlers.py", line 866, in _connect_unixsocket
self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
File "/usr/local/bin/ocrd", line 12, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/core/ocrd/ocrd/cli/resmgr.py", line 174, in download
log.info("Use in parameters as '%s'", resmgr.parameter_usage(resdict['name'], usage=resdict.get('parameter_usage', 'as-is')))
Message: "Use in parameters as '%s'"
Arguments: ('default-2021-03-09',)
Oops, sorry, my mistake. This was on a container with /dev/log missing (because no rsyslog installed) despite a syslog handler in ocrd_logging.conf requiring it.