cilynx / pantomath

Pantomath knows about things
GNU General Public License v3.0
1 stars 0 forks source link

Thread dies when scanning single page #24

Closed cilynx closed 2 years ago

cilynx commented 2 years ago
08:03:17: Debug: Importing Image
Exception in thread Thread-2 (_scan_one_from_flatbed):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "/home/rcw/Repos/pantomath/src/scanner.py", line 176, in _scan_one_from_flatbed

  File "/home/rcw/Repos/pantomath/src/library.py", line 63, in import_image
    doc = Document(self.new_id(), [pil_image])
  File "/home/rcw/Repos/pantomath/src/document.py", line 32, in __init__
    self.original = Original(pages)
  File "/home/rcw/Repos/pantomath/src/original.py", line 27, in __init__
    if len(pages) == 1 and pages[0].is_animated:
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 548, in __getattr__
    raise AttributeError(name)
AttributeError: is_animated

Looks related to https://github.com/python-pillow/Pillow/issues/4609