The latest update to python-pdfminer breaks ocrmypdf. Until upstream puts out a new version, the fix is pretty simple: just add a line with sed -i "s|20211012|20220319|g" setup.cfg
to the package()
section before the line with setup.py.
Search Criteria
Package Details: ocrmypdf 16.7.0-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/ocrmypdf.git (read-only, click to copy) |
---|---|
Package Base: | ocrmypdf |
Description: | A tool to add an OCR text layer to scanned PDF files, allowing them to be searched |
Upstream URL: | https://github.com/ocrmypdf/OCRmyPDF |
Licenses: | MPL2 |
Submitter: | dreuter |
Maintainer: | fbrennan (pigmonkey) |
Last Packager: | pigmonkey |
Votes: | 125 |
Popularity: | 3.53 |
First Submitted: | 2014-01-27 11:36 (UTC) |
Last Updated: | 2024-12-10 05:10 (UTC) |
Dependencies (21)
- ghostscript
- img2pdf (img2pdf-gitAUR)
- pngquant
- python (python37AUR, python311AUR, python310AUR)
- python-deprecation
- python-importlib_resources
- python-packaging
- python-pdfminer (pdfminerAUR)
- python-pikepdf
- python-pillow
- python-pluggy
- python-reportlab
- python-rich
- python-tqdm
- tesseract (tesseract-gitAUR)
- unpaper (unpaper-gitAUR)
- python-build (make)
- python-hatch-vcs (make)
- python-installer (python-installer-gitAUR) (make)
- python-wheel (make)
- jbig2encAUR (jbig2encAUR, jbig2enc-gitAUR) (optional) – Better compression algorithm; results in smaller PDF files
Required by (6)
- docspell-joex (optional)
- dpsprep-git (optional)
- phoronix-test-suite-git (optional)
- python-ocrmypdf-papermerge
- riven-original-soundtrack (make)
- stirling-pdf-bin
Sources (1)
Latest Comments
« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 .. 22 Next › Last »
frankspace commented on 2022-03-24 06:39 (UTC) (edited on 2022-03-24 06:39 (UTC) by frankspace)
malacology commented on 2022-02-13 12:10 (UTC)
@allexj, you need to install python-setuptools to solve it, img2pdf already reply on this package, so I am a little worried about your dependcies
allexj commented on 2022-02-12 10:36 (UTC)
$ ocrmypdf /usr/lib/python3.10/site-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 2.0.5-build-libtorrent-rasterbar-src-libtorrent-rasterbar-2.0.5-bindings-python is an invalid version and will not be supported in a future release warnings.warn( Traceback (most recent call last): File "/usr/bin/ocrmypdf", line 33, in <module> sys.exit(load_entry_point('ocrmypdf==13.3.0', 'console_scripts', 'ocrmypdf')()) File "/usr/lib/python3.10/site-packages/ocrmypdf/main.py", line 35, in run _parser, options, plugin_manager = get_parser_options_plugins(args=args) File "/usr/lib/python3.10/site-packages/ocrmypdf/_plugin_manager.py", line 116, in get_parser_options_plugins plugin_manager = get_plugin_manager(pre_options.plugins) File "/usr/lib/python3.10/site-packages/ocrmypdf/_plugin_manager.py", line 104, in get_plugin_manager pm = OcrmypdfPluginManager( File "/usr/lib/python3.10/site-packages/ocrmypdf/_plugin_manager.py", line 45, in init self.setup_plugins() File "/usr/lib/python3.10/site-packages/ocrmypdf/_plugin_manager.py", line 73, in setup_plugins module = importlib.import_module(name) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3.10/site-packages/ocrmypdf/builtin_plugins/ghostscript.py", line 11, in <module> from ocrmypdf._exec import ghostscript File "/usr/lib/python3.10/site-packages/ocrmypdf/_exec/ghostscript.py", line 21, in <module> from PIL import Image, UnidentifiedImageError ImportError: cannot import name 'UnidentifiedImageError' from 'PIL' (/home/allexj/.local/lib/python3.10/site-packages/PIL/init.py)
hirunatan commented on 2022-01-26 15:57 (UTC)
Perhaps it will be good to notify the user, after installing, that they need to install the tesseract-data language packages, to use it.
https://ocrmypdf.readthedocs.io/en/latest/installation.html#arch-linux-aur
marco.righi commented on 2022-01-11 15:58 (UTC) (edited on 2022-01-11 16:00 (UTC) by marco.righi)
@bsdiceRobert, thanks a lot for your suggestion. I wrote the following code that should re-compile packages one by one. Perhaps the script rebuilds some packages more times but avoids errors that could stop the entire rebuild process.
#!/bin/bash
logfile=~/log/python3xRebuild.log
echo START $(date) |tee -a $logfile
PYDIRS=$(stat -c '%W %n' /usr/lib/python[3-9].* | sort -n | head -n -1 | awk '{ print $2 }')
if [ -n "$PYDIRS" ]; then
for d in $PYDIRS; do
#echo "Found obsolete python directory $d, packages requiring rebuild:"
for p in $(pacman -Qoq "$d"); do
command=$(echo yay -S $p --rebuildtree --noconfirm)
echo $command |tee -a $logfile
eval $command
done
done
fi
bsdice commented on 2022-01-11 15:37 (UTC) (edited on 2022-01-11 15:37 (UTC) by bsdice)
FYI the script snippet will not rebuild anything by itself but only check for directories older than the most current /usr/lib/python3.* directory. If you have python3.10 + python3.9 + python3.8 it will look at only 3.9 and 3.8 and then list all packages referencing these obsolete directories. If you reinstall these packages they should be installed for the most recent 3.10 in this example and while doing so, get removed from 3.9 or 3.8. So if you run the snippet again, the number of packages shown will shrink. In theory you could add
yay --noconfirm --answerdiff None --answerupgrade None "$d" || exit 1
after the "pacman" command before the "done", but better do it manually.
bsdice commented on 2022-01-11 11:31 (UTC)
@marco.righi You can try this within a script:
PYDIRS=$(stat -c '%W %n' /usr/lib/python[3-9].* | sort -n | head -n -1 | awk '{ print $2 }')
if [ -n "$PYDIRS" ]; then
for d in $PYDIRS; do
echo "Found obsolete python directory $d, packages requiring rebuild:"
pacman -Qoq "$d"
done
fi
Then use yay pikaur or whatever to rebuild anything found.
marco.righi commented on 2022-01-11 09:16 (UTC)
Do you know a script to rebuild all AUR Python dependencies?
nottoday commented on 2021-12-24 14:30 (UTC)
@jbarlow python-pikepdf is on version 4.2.0-1. I've tried updating it to 4.2.0-2 (from the arch repo). But that still gives the same error.
Pinned Comments
fbrennan commented on 2023-05-12 22:54 (UTC)
The flag was invalid and has been removed with no action taken as no new version was released. There's nothing to do for this package; no new release has been made. Rebuild, as @eclairevoyant has said.