Import via Web UI (Ghostscript rasterizing) failed
-
Did anyone ever have a similar problem?
File "/app/code/src/documents/consumer.py", line 151, in _fail Nov 29 09:58:36 File "/app/code/src/documents/consumer.py", line 151, in _fail Nov 29 09:58:36 File "/app/code/src/documents/consumer.py", line 477, in run Nov 29 09:58:36 File "/app/code/src/documents/consumer.py", line 477, in run Nov 29 09:58:36 File "/app/code/src/documents/consumer.py", line 509, in run Nov 29 09:58:36 File "/app/code/src/documents/consumer.py", line 509, in run Nov 29 09:58:36 File "/app/code/src/documents/tasks.py", line 148, in consume_file Nov 29 09:58:36 File "/app/code/src/documents/tasks.py", line 148, in consume_file Nov 29 09:58:36 File "/app/code/src/paperless_tesseract/parsers.py", line 381, in parse Nov 29 09:58:36 File "/app/code/src/paperless_tesseract/parsers.py", line 404, in parse Nov 29 09:58:36 File "/app/code/src/paperless_tesseract/parsers.py", line 404, in parse Nov 29 09:58:36 File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result Nov 29 09:58:36 File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result Nov 29 09:58:36 File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run Nov 29 09:58:36 File "/usr/lib/python3.10/subprocess.py", line 526, in run Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/asgiref/sync.py", line 327, in main_wrap Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/asgiref/sync.py", line 327, in main_wrap Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/celery/app/trace.py", line 453, in trace_task Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/celery/app/trace.py", line 736, in __protected_call__ Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_concurrent.py", line 78, in __call__ Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_exec/ghostscript.py", line 137, in rasterize_pdf Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_exec/ghostscript.py", line 140, in rasterize_pdf Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_pipeline.py", line 384, in rasterize_preview Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_pipelines/_common.py", line 386, in process_page Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_pipelines/ocr.py", line 117, in exec_concurrent Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_pipelines/ocr.py", line 190, in _run_pipeline Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_pipelines/ocr.py", line 223, in run_pipeline Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/_pipelines/ocr.py", line 78, in _exec_page_sync Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/api.py", line 380, in ocr Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/builtin_plugins/concurrency.py", line 144, in _execute Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/builtin_plugins/ghostscript.py", line 105, in rasterize_pdf_page Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/ocrmypdf/subprocess/__init__.py", line 62, in run Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 103, in _multicall Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/pluggy/_callers.py", line 139, in _multicall Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/pluggy/_hooks.py", line 513, in __call__ Nov 29 09:58:36 File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 120, in _hookexec Nov 29 09:58:36 R = retval = fun(*args, **kwargs) Nov 29 09:58:36 The above exception was the direct cause of the following exception: Nov 29 09:58:36 The above exception was the direct cause of the following exception: Nov 29 09:58:36 The above exception was the direct cause of the following exception: Nov 29 09:58:36 The above exception was the direct cause of the following exception: Nov 29 09:58:36 The above exception was the direct cause of the following exception: Nov 29 09:58:36 Traceback (most recent call last): Nov 29 09:58:36 Traceback (most recent call last): Nov 29 09:58:36 Traceback (most recent call last): Nov 29 09:58:36 Traceback (most recent call last): Nov 29 09:58:36 Traceback (most recent call last): Nov 29 09:58:36 Traceback (most recent call last): Nov 29 09:58:36 [2024-11-29 08:58:36,673] [ERROR] [celery.app.trace] Task documents.tasks.consume_file[ad8ebdd0-d965-4926-a8ff-afd203019438] raised unexpected: ConsumerError('Rechnung_40000206255325.pdf: Error occurred while consuming document Rechnung_40000206255325.pdf: SubprocessOutputError: Ghostscript rasterizing failed. See logs for more information.') Nov 29 09:58:36 document_parser.parse(self.working_copy, mime_type, self.filename) Nov 29 09:58:36 document_parser.parse(self.working_copy, mime_type, self.filename) Nov 29 09:58:36 documents.consumer.ConsumerError: Rechnung_40000206255325.pdf: Error occurred while consuming document Rechnung_40000206255325.pdf: SubprocessOutputError: Ghostscript rasterizing failed. See logs for more information. Nov 29 09:58:36 documents.consumer.ConsumerError: Rechnung_40000206255325.pdf: Error occurred while consuming document Rechnung_40000206255325.pdf: SubprocessOutputError: Ghostscript rasterizing failed. See logs for more information. Nov 29 09:58:36 documents.parsers.ParseError: SubprocessOutputError: Ghostscript rasterizing failed. See logs for more information. Nov 29 09:58:36 documents.parsers.ParseError: SubprocessOutputError: Ghostscript rasterizing failed. See logs for more information. Nov 29 09:58:36 executor( Nov 29 09:58:36 ghostscript.rasterize_pdf( Nov 29 09:58:36 msg = plugin.run() Nov 29 09:58:36 msg = plugin.run() Nov 29 09:58:36 ocr_image_out, pdf_page_from_image_out, orientation_correction = process_page( Nov 29 09:58:36 ocrmypdf.exceptions.SubprocessOutputError: Ghostscript rasterizing failed Nov 29 09:58:36 ocrmypdf.ocr(**args) Nov 29 09:58:36 optimize_messages = exec_concurrent(context, executor) Nov 29 09:58:36 p = run(args_gs, stdout=PIPE, stderr=PIPE, check=True) Nov 29 09:58:36 page_context.plugin_manager.hook.rasterize_pdf_page( Nov 29 09:58:36 proc = subprocess_run(args, env=env, check=check, **kwargs) Nov 29 09:58:36 raise CalledProcessError(retcode, process.args, Nov 29 09:58:36 raise ConsumerError(f"{self.filename}: {log_message or message}") from exception Nov 29 09:58:36 raise ConsumerError(f"{self.filename}: {log_message or message}") from exception Nov 29 09:58:36 raise ParseError( Nov 29 09:58:36 raise ParseError( Nov 29 09:58:36 raise SubprocessOutputError('Ghostscript rasterizing failed') from e Nov 29 09:58:36 raise exc_info[1] Nov 29 09:58:36 raise exc_info[1] Nov 29 09:58:36 raise exception.with_traceback(exception.__traceback__) Nov 29 09:58:36 raise self._exception Nov 29 09:58:36 rasterize_preview_out = rasterize_preview(page_context.origin, page_context) Nov 29 09:58:36 res = hook_impl.function(*args) Nov 29 09:58:36 result = future.result() Nov 29 09:58:36 result = self.fn(*self.args, **self.kwargs) Nov 29 09:58:36 return _run_pipeline(options, plugin_manager) Nov 29 09:58:36 return run_pipeline(options=options, plugin_manager=plugin_manager) Nov 29 09:58:36 return self.__get_result() Nov 29 09:58:36 return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) Nov 29 09:58:36 return self._inner_hookexec(hook_name, methods, kwargs, firstresult) Nov 29 09:58:36 return self.run(*args, **kwargs) Nov 29 09:58:36 self._execute( Nov 29 09:58:36 self._fail( Nov 29 09:58:36 self._fail( Nov 29 09:58:36 subprocess.CalledProcessError: Command '['gs', '-dQUIET', '-dSAFER', '-dBATCH', '-dNOPAUSE', '-dInterpolateControl=-1', '-sDEVICE=jpeggray', '-dFirstPage=1', '-dLastPage=1', '-r300.000000x300.000000', '-dPDFSTOPONERROR', '-o', '-', '-sstdout=%stderr', '-dAutoRotatePages=/None', '-f', '/tmp/ocrmypdf.io.2qeqs4br/origin.pdf']' returned non-zero exit status 1.
-
Haven't seen that, but you can see the failing command in the last line of your logs:
gs -dQUIET -dSAFER -dBATCH -dNOPAUSE -dInterpolateControl=-1 -sDEVICE=jpeggray -dFirstPage=1 -dLastPage=1 -r300.000000x300.000000 -dPDFSTOPONERROR -o - -sstdout=%stderr -dAutoRotatePages=/None -f /tmp/ocrmypdf.io.2qeqs4br/origin.pdf
Can you run that in the webterminal and maybe see more logs?
Most likely this is something to report upstream though.
-
@nebulon said in Import via Web UI (Ghostscript rasterizing) failed:
Haven't seen that, but you can see the failing command in the last line of your logs:
gs -dQUIET -dSAFER -dBATCH -dNOPAUSE -dInterpolateControl=-1 -sDEVICE=jpeggray -dFirstPage=1 -dLastPage=1 -r300.000000x300.000000 -dPDFSTOPONERROR -o - -sstdout=%stderr -dAutoRotatePages=/None -f /tmp/ocrmypdf.io.2qeqs4br/origin.pdf
Can you run that in the webterminal and maybe see more logs?
Most likely this is something to report upstream though.
gs -dQUIET -dSAFER -dBATCH -dNOPAUSE -dInterpolateControl=-1 -sDEVICE=jpeggray -dFirstPage=1 -dLastPage=1 -r300.000000x300.000000 -dPDFSTOPONERROR -o - -sstdout=%stderr -dAutoRotatePages=/None -f /tmp/ocrmypdf.io.2qeqs4br/origin.pdfVICE=jpeggray -dFirstPage=1 -dLastPage=1 -r300.00 Error: /undefinedfilename in (/tmp/ocrmypdf.io.2qeqs4br/origin.pdf)Pages=/None -f /tmp/ocrmypdf.io.2qeqs4br/origin.pdf Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push Dictionary stack: --dict:770/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- Current allocation mode is local Last OS error: No such file or directory GPL Ghostscript 9.55.0: Unrecoverable error, exit code 1 root@bd1bd380-b8c0-4d3f-960a-22b6f1101d46:/app/code#
-
I'll have to watch this issue
-