Skip to content

--remove-background options currently not implemented? #884

@Perangelot

Description

@Perangelot

--remove-background does not work for me, producing the following error code:

concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.10/concurrent/futures/process.py", line 243, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 192, in exec_page_sync
ocr_image, preprocess_out = make_intermediate_images(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 135, in make_intermediate_images
preprocess_out = preprocess(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 104, in preprocess
image = preprocess_remove_background(image, page_context)
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_pipeline.py", line 469, in preprocess_remove_background
raise NotImplementedError("--remove-background is temporarily not implemented")
NotImplementedError: --remove-background is temporarily not implemented
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 385, in run_pipeline
exec_concurrent(context, executor)
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 274, in exec_concurrent
executor(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_concurrent.py", line 82, in __call__
self._execute(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/builtin_plugins/concurrency.py", line 135, in _execute
result = future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 438, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
NotImplementedError: --remove-background is temporarily not implemented```

It seems to be irrespective of the pdf file I put in. I have installed ocrmypdf via `pip` because the arch package could not install; for some reason, `python-humanfriendly` could not be detected there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions